Arduino Forum

Topics => Robotics => Topic started by: Kyron on Apr 19, 2017, 05:32 am

Title: Servo only moving once
Post by: Kyron on Apr 19, 2017, 05:32 am
Sorry if this has been asked before but I can not figure this out.

I am using a DUE to some small digital servos, but they only move once when the sketch finishes uploading and not again.

This is with the sweep example sketch and the Servo.h lib.  I have also tried adafruit_soft servo.

I tried writing some trouble shooting code and what I came up with was that the second time it tries to do servo.write(angle) it is stopping and trying to go back to the first angle. The servo is getting locked in trying to do both angles and the program does not progress.

I tried uninstalling my Arduino IDE and installing the latest version with no effect. All my boards and libraries appear to be up to date.

I really don't know what to do.
Title: Re: Servo only moving once
Post by: jremington on Apr 19, 2017, 05:46 am
If you are trying to power the servos from the Arduino, don't. Use a 4xAA battery pack for the servos, and connect all the grounds together.

Otherwise, for informed help, read the "How to use this forum" post and follow the directions.
Title: Re: Servo only moving once
Post by: Kyron on Apr 19, 2017, 05:53 am
I really did not think that with no load on the servo that would be an issue, but that was it. Thank you very much  :)