nakkaya/clodiuno

Help for a newb reading GPS data?

Opened this issue · 3 comments

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...

(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:

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 Aaron,

For reading / controlling various sensors there examples at,

as for the GPS can you give me a link?

Hi Nurullah,

Thanks for your reply. I've read the documents you linked to, that's how I learned to try analog-read and digital-read. However, those don't seem to return any useful results for me, so I'm not sure what my next step should be?

The GPS came with this Arduino Mega sold by udrones.com:
http://www.udrones.com/product_p/expck1.htm

According to that product page, the GPS is a MediaTek MT3329 GPS 10Hz. I am connecting it to the Arduino with a 6-pin GPS connector (EM406 style).

I've been trying the -read functions provided by Cloduino, for all pin numbers, but I get 0 out for the digital reads, and NPEs for the analog ones. Any hints or tips are greatly appreciated...

Yours,
Aaron

How do you talk to it from wiring?

Nurullah Akkaya
http://nakkaya.com

On Sat, Jul 28, 2012 at 8:22 AM, Aaron Crow
reply@reply.github.com
wrote:

Hi Nurullah,

Thanks for your reply. I've read the documents you linked to, that's how I learned to try analog-read and digital-read. However, those don't seem to return any useful results for me, so I'm not sure what my next step should be?

The GPS came with this Arduino Mega sold by udrones.com:
http://www.udrones.com/product_p/expck1.htm

According to that product page, the GPS is a MediaTek MT3329 GPS 10Hz. I am connecting it to the Arduino with a 6-pin GPS connector (EM406 style).

I've been trying the -read functions provided by Cloduino, for all pin numbers, but I get 0 out for the digital reads, and NPEs for the analog ones. Any hints or tips are greatly appreciated...

Yours,
Aaron

Thanks again for any tips you have for me, for how to get meaningful data from the GPS and other sensors.


Reply to this email directly or view it on GitHub:
#4 (comment)