Storing GPS coordinates to memory
Carl Lawhon
Posts: 36
Ok guys, I have a question for you. My robot has a gps unit on it, and basically what I want it to do is to roam in a field collecting coordinates as it wanders. It then want to be able to pull those coordinates from it so that I can make a sort of map of its path. How can I get the bot to store the coordinates it reads to some sort of memory? More importantly how can I read back those coordinates from it on a computer? any help is greatly appreciated.
Comments
John Abshier
Something along the lines of:
IF (GPS_LAT <> EEPROM.READ(ADDR)) 'If the EEPROM addresses value is something other than GPS_LAT...
EEPROM.WRITE(GPS_LAT, ADDR) 'Store GPS_LAT to the EEPROM address
Of course I'm assuming much in this little example, like GPS_LAT is a variable holding the last latitude reading from the GPS, and EEPROM is an included object used for reading and writing to the external EEPROM. But this is pretty much what I do to avoid storing a value to the EEPROM that's already there.
Hope this helps,
Austin
PS in the example, for some reason it won't show that the EEPROM.WRITE command is indented, but it of course should be to be used by IF
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Austin Bowen,
Robo-freak.com
www.livesoundforum.com
"One must watch out for mechanics. They start out with a sewing machine, and end up with the atomic bomb" - A quote from someone that I saw on Addall.com
"Not only do I see the glass as half empty, I wonder if anyone poisoned the glass with arsenic" - My dad, inside joke haha
Post Edited (Robofreak) : 1/6/2009 7:42:49 PM GMT
John Abshier
EDIT: I have figured everything out.
Post Edited (Carl Lawhon) : 1/6/2009 9:39:05 PM GMT