Monday, July 11, 2011

Arduino Update

This week started out strong! I got the GPS hooked up after only a little trouble (it's amazing what having the right pin-out will do for you!) and I was able to print the raw NMEA message through the Serial Monitor. It was pretty much downhill from there. I am having quite a bit of trouble using the data that I get from the GPS. I can read the messages using a software serial implementation or through the actual hardware serial port and print it out but anytime I try to parse it and use it for anything it just completely stops updating. I started out using a software serial implementation and using String::substring() to get the parts of the messages but that was really ugly and didn't work so I wrote a String Tokenizer using strtok which also didn't work. The next thing I tried was to switch to using the hardware serial port and tweaking my StringTokenizer and that works some of the time. I don't know if there is an error in my code that crashes the Arduino or what! I have been working on it for the last four days so I think I may just move on to something new and come back to this! I got my USB Host Shield so I am going to try to get that working tonight with my Nexus S.

No comments:

Post a Comment