Hello.

If you are using encoders, you can count the transitions to determine how far the motor has turned. You can divide the number of ticks you have counted by the CPR (counts per revolution) of your encoder. Also, keep in mind that many motors have the encoder attached directly to the motor shaft, so if your motor has a gearbox, you will also need to factor in the gear ratio. In that case, the number of ticks that make 1 revolution of the output shaft would be equal to the CPR of your encoder multiplied by the gear ratio. Since that gives you how many revolutions your motor’s output shaft has turned, you can then determine the distance your robot has traveled by multiplying by the circumference of your wheels.

For example, if you want your robot to travel 10m, using an 80mm diameter wheel, a 30:1 gearmotor, and a 12 CPR quadrature encoder, your equation to determine how many ticks it would take should look like this:

```
Distance traveled = (ticks ÷ (CPR × gear ratio)) × circumference of wheel
```

or

```
10m = 10000mm = (ticks ÷ (12 × 30)) × 80 × π
```

There are many ways to go about displaying this type of information. If you can post more details about your system and the components you are using, I might have some suggestions.

Brandon