Checking if the servo is functional by calling
servo(20) might be a little too limited.
What we can do is to go through more positions and see if/how the servo reacts.
Check out this example code for the servo. It's called basic_servo.py
If the servo is bad then it might make a sound when trying to reposition it or it might do nothing (the latter is less likely though).
Another way of figuring out if the servo is bad is to take an
LED and place it on top of the connector.
Please handle the situation very carefully.
It's better if you have jumpers (
The first pin from the right side (face the
GoPiGo robot towards you - just like in your picture) goes to the cathode of the
LED. The pin from the left side goes to the anode of the
LED. The middle pin of servo connector is let free.
Here's a picture of the cathode & anode of an
Now run the following code:
from gopigo import *
from time import sleep
# we update the servo every half a second
# because after some time the command is canceled
# and hence, you don't get any PPM signal
Check if the
LED is emitting a weak light.
It's a weak light because we have a
The important thing is to light up a little.
If there's a weak light, then you have a faulty servo.