Calibrating the Legs

You may notice that the movement of either or both of your robot's legs is not symmetrical.

There are two ways to go about calibrating the position of the legs so that your robot's gait is smooth(ish). Choose your preferred method below.

Digital Calibration

While connected to your computer, you can use Mu to quickly dial in the numbers for each servo.

In Mu, click on the REPL icon and watch the printout at the bottom of the program to see which leg movement is related to which block of code.

It may be helpful to label each leg something like "Front 1", "Back 1", "Front 2", "Back 2", to help keep track of each of them.

Change the numbers in index = 50 and while index <= 100 to alter the swing of each leg.

The front legs should alternate about 40 degrees back and forth.

The back legs swing about 30 degrees up and down.

Analog Calibration

Alternatively, if you prefer a more hands-on method, you can skip the programming side of things and simply remove the legs and reposition them as needed.

This method can take some time to get exactly right, but works well if you aren't able to connect to a computer and update the code.py file.

Calibrated legs should move equally in both directions.

This guide was first published on May 30, 2018. It was last updated on May 30, 2018. This page (Calibrating the Legs) was last updated on Jul 09, 2019.