-1

We are building a boat which needs to steer towards a certain coordinate. Therefore we attached a GPS and a compass into the board. We were able calculate the direction that the boat has to steer. When we plug in the GPS module together with the compass the system works. When we add the servo to the circuit, the servo will swing back and forth continually, even when in the code we only attach the servo (and don't controll it). If we unplug the GPS, the servo will stop swinging. Does anybody know why the GPS and the servo are not able to function well in the same circuit of the arduino?

We hope to find a solution to this problem we've been struggling with for way too long,

Thanks for your help,

Justin van Til

Ramesh-X
  • 4,853
  • 6
  • 46
  • 67
  • This site is for programming problems. You've got what sounds like an electrical/mechanical problem, which is off-topic. – Marc B Mar 27 '15 at 14:12
  • This seems to be a bit too broad for Stack Overflow (it's not a [specific programming problem](http://stackoverflow.com/help/on-topic)) but perhaps the [Electrical Engineering](http://electronics.stackexchange.com/) or [Arduino](http://arduino.stackexchange.com/) SE sites will be able to help you. – GoBusto Mar 27 '15 at 14:13
  • The problem was that the code library of the servo and the one of the gps are using the same hardware timer. Switched the servo library and it's all good now, thanks guys ;) – Just van Til Apr 10 '15 at 00:08

1 Answers1

0

When crazy things like this happen on Arduino, check to make sure that libraries are compatible. I've been told the Software serial library isn't compatible with the servo library. (Causing the swinging)