Hi there,
First off- I am a beginner with all this, so forgive me if I am being an idiot!
I am doing a project for college and the aim is to log GPS info onto an SD card. The GPS information is printed in a 'CSV' string to the card, which is imported into google fusion tables.
I have the GPS and SD card reader working together, and the information is printing to the SD card as it should. My problem however, is that the "string" seems to mess up every so often, seemingly a speed issue. The information printed to the card is as follows- : "TIME, LATITUDE, LONGITUDE, SPEED".
The program uses the TinyGPS+ library, which tells it to print the following information to the SD each loop. What seems to happen is that the speed takes too long to update on some cycles, which causes the string to start again, until the speed is updated and it then carries on.
I originally thought that this was a baudrate issue from the GPS working faster than the program could, but after lowering the GPS baudrate, the problem still occurs (see the attached GPS image). I also tried adding a delay at the end of each loop, which made no difference.
Any ideas how I could fix this? Is there a command which I could put in the code which waits for all the information required from the GPS, before printing it and moving on to the next line?
I have also attached my code.
Thanks
CollegeArduinoGPSwithSD.ino (2.42 KB)