Page 1 of 1

C prog on SimpleServo,sometimes servo motor spins endlessly

Posted: Tue Feb 21, 2017 9:04 pm
by ichudov
I wrote a simple program to talk to a Phidgets servo controller, and hooked up a 9 gram servo to it. It is based on Simple Servo.

The program is contained here:

http://igor.chudov.com/tmp/servo.c

After I wrote it, it was working. Meaning that the servo would rotate as instructed and stopped.

Then I forgot about it for a day, rebooted my Linux system, and after that as soon as I start the program, the servo begins to spin endlessly.

It seems to happen even if I comment out the part responsible for actually actuating the servo and occurs during initialization.

Any idea why a servo would endlessly spin and not stop?

Re: C prog on SimpleServo,sometimes servo motor spins endles

Posted: Wed Feb 22, 2017 8:29 am
by mparadis
Are you sure you're setting the min and max pulse width properly with setServoParameters? If the servo is running even when it's not given a target position, that means that the zero position is being interpreted by the servo as something that's not zero. Have a look at this page for more information.