I have built a robot that uses continuous rotation servos as motors.
I program the destination coordinates (latitude and longitude), the software calculates the heading needed based on current position (via GPS), turns to face bearing (using accelerometer compensated compass) and heads towards destination.
The code works but I have a problem with the servos and the GPS. When I start the GPS with the GPS.begin(9600); command the servos turn, stop, turn, stop, etc...
Now I thought the servos may be picking up interference from the switching of the pins used to communicate with the GPS, I attached an oscilloscope to the servo pins and found a constant pulse. I tried to sink this pulse with a 1K resistor to ground but it didn't work. I tested other pins and the signal wasn't present, so I moved the servo to these pins (physically and in the code) and the pulse followed.
I also realised whenever I comment out the servo.attach() command OR the GPS.begin() command the servos remain still. So I am now at the conclusion that the software is to blame (maybe the two libraries are conflicting, using the same memory location or something?)
My coding is very limited, a lot of the code I have used has been copied from various sites. I have attached my code, named Navigation and the TinyGPS library. If someone could have a glance over the code, the TinyGPS library and the standard servo library for potential conflicts it would be most appreciated!
Files (compressed via RAR) : Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.
Regards