Skip to content

Servo ID Setup

In order to interface each of the servos, a unique ID must be assigned to each servo.

The servos need to have IDs assigned as follows. Follow the procedure at the bottom of this page to set each servo ID.
Servo IDs

Sprocket Setup Script

In a SSH session, navigate into the Sprocket folder that contains the Sprocket Python code.

Navigating folders through the command line

Use the cd command to change directory. If you are in your home directory and the Sprocket code was cloned there, you can navigate into the Sprocket directory using the following command:

cd ~/Sprocket

It is recommended to become familiar with basic unix navigation commands, such as cd to change directory, ls to list the contents in the current directory, amd pwd to print the current directory.

Navigate to the setup directory.

cd setup

Run the Sprocket setup script by executing the following command:

python setup.py

You should see an output simmilar to the following:

Welcome to Sprocket Setup

Commands:
D: Detect Servos
C {Old ID} {New ID} {Optional: Baud.  Defaults to 115200}: Change ID
Q: Quit

You can now use the D command to detect any connect servos and the C command to change a servo ID.

To change a servo ID, type C OLD_ID NEW_ID. For instance, to change a servo with an ID of 1 to an ID of 7, use the C 1 7 command.

Sprocket Servo ID Configuration Procedure

  1. Disconnect and set aside all servo cables. Take note of how they were routed, you will need to re-connect all cables at the end of this procedure after setting all 12 servo IDs. You may need to remove the cover to access the servo cable ends at are connected to the PCB. See the section under "Build > Leg Wiring" if you forget how the cables were routed.

  2. Using a long servo cable, connect the servo #2 (Left Front Hip Servo) to one of the servo connectors on the PCB.

  3. Power on Sprocket (including the servos). Ensure the LED on only the intended servo illuminates.

  4. Run the C 1 2 Sprocket setup command to reassign servo ID 1 to servo ID 2.

  5. Disconnect the servo cable from the servo. Repeat steps 2-4 for the remaining servos, ID 3-12. You may need to move which PCB connector the servo cable is connected to for each leg.

  6. Power off Sprocket. Reconnect all of the servo cables that you disconnected from step 1. Power back on, and ensure that all 12 servo LEDs illuminate.

  7. Run the Detect Servo Sprocket setup command D to detect all servos. Make sure all 12 servos are detected. The expected output is shown below:
    Servo IDs
    If a servo is missing from the list, go back and reassign the correct ID to that servo.