Pages: [1]   Go Down
Author Topic: Using Flash to send over GPS coordinates  (Read 984 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been wrapping my brain around sending commands from flash to the arduino and interpreting the data correctly. After following the tutorial listed in the playground that explains how to send a double over to the arduino, I started to ask myself... 'how can I send a set of doubles over, or a set of gps coordinates?' 

I don't need an explicit answer as I'm trying to figure this out for myself- but for some reason I'm having trouble wrapping my brain around the idea of sending over a latitude and always having the arduino know to store that in the eeprom as a latitude rather than a longitude. Does anyone have any tips into what I should look into?

Thanks!

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess I'm confused now, whenever I send a string from flash the arduino just sees it as a byte array.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 617
Posts: 49463
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I guess I'm confused now, whenever I send a string from flash the arduino just sees it as a byte array.
Yeah. And the problem with that is?

You need to send something that you know how to parse. Like "Lat: 123.45 Lon: 987.65". Then, you need to parse it.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Makes sense. I'll start from the get go.

I've been developing on an uno and for my first project I've been working on a GPS navigation system. I have all the GPS stuff working; it gives me my distance and all the data I need etc... So, to take this to the next level, I wanted to build a flash front end to save a destination using google maps. I've seen some of the flash+arduino integration tutorials through the playground, but so far all the tutorials I've seen are either using the NETLab or teach you how to turn a light on and off.

The idea of parsing a byte array and converting the data back into a data structure the arduino can use is a bit daunting for me at the moment. I figured how to parse floats with this tutorial:
http://www.mikechambers.com/blog/2010/08/01/sending-multibyte-numbers-from-actionscript-to-arduino/

But beyond this, I wasn't sure how to identify the data as one type of variable or another (does that make sense?).  I will say that I just found this library (aJson), which looks really promising. I can build a json object from flash or any web service without any issues.
http://interactive-matter.eu/how-to/ajson-arduino-json-library/
Logged

Pages: [1]   Go Up
Jump to: