Hi Nurullah,
Clodiuno is super cool, thanks for doing it!
I'm a proud and excited owner of an Arduino Mega 2560, from udrones:
http://www.udrones.com/product_p/expck1.htm
I got it hooked up to my Mac, and followed your instructions for getting Cloduino going. Your basic example of making the LED on pin 13 blink, works fine. Thanks!
Now I'm wondering how to read data from the GPS which I've plugged in? I'm a total newb here, so I don't even know which pins to read, or whether I need to read analog or digital?
But I've tried every combination of things I can think of.
I've done this, thinking it's the way to prepare all pins for reading:
(dorun (map #(pin-mode board % INPUT) (range 72)))
And then I've tried...
... for all legal pin numbers in place of i. I get 0 back for every call.
So then I've tried...
... for all legal pin numbers in place of i. I get the same NPE for every call:
No message.
[Thrown class java.lang.NullPointerException]
Restarts:
0: [QUIT] Quit to the SLIME top level
Backtrace:
0: firmata.clj:110 clodiuno.firmata/eval1980[fn]
1: MultiFn.java:167 clojure.lang.MultiFn.invoke
2: NO_SOURCE_FILE:1 arduclj.core/eval2136
3: Compiler.java:6465 clojure.lang.Compiler.eval
4: Compiler.java:6431 clojure.lang.Compiler.eval
5: core.clj:2795 clojure.core/eval
6: basic.clj:47 swank.commands.basic/eval-region
7: basic.clj:37 swank.commands.basic/eval-region
8: basic.clj:71 swank.commands.basic/eval956[fn]
9: Var.java:401 clojure.lang.Var.invoke
--more--
I really am a newb here! May I ask you how I can go about getting input from the pins? And how to find out which pins to read for the GPS? (Or any sensor, for that matter?)
Thanks again for such a cool and fun project to play with, and any help or tips are greatly appreciated...
Aaron
Hi Nurullah,
Clodiuno is super cool, thanks for doing it!
I'm a proud and excited owner of an Arduino Mega 2560, from udrones:
http://www.udrones.com/product_p/expck1.htm
I got it hooked up to my Mac, and followed your instructions for getting Cloduino going. Your basic example of making the LED on pin 13 blink, works fine. Thanks!
Now I'm wondering how to read data from the GPS which I've plugged in? I'm a total newb here, so I don't even know which pins to read, or whether I need to read analog or digital?
But I've tried every combination of things I can think of.
I've done this, thinking it's the way to prepare all pins for reading:
And then I've tried...
(digital-read board i)... for all legal pin numbers in place of i. I get 0 back for every call.
So then I've tried...
(analog-read board i)... for all legal pin numbers in place of i. I get the same NPE for every call:
I really am a newb here! May I ask you how I can go about getting input from the pins? And how to find out which pins to read for the GPS? (Or any sensor, for that matter?)
Thanks again for such a cool and fun project to play with, and any help or tips are greatly appreciated...
Aaron