The enc_read() method only provides integer values for the travelled centimetres.
As the physical encoder has much more steps, is it possible to obtain these raw encoder values? One could compute more precise values from these.
Is it also possible to reset the encoder values to 0?
Hey christian,
You cannot reset the encoder values coming back from the GoPiGo to 0 but what you can do in the python program is to read the encoder value using enc_read() funciton at the start of the program and store the initial value in a variable. Whenever you need a encoder value, you can just subtract this fom the latest encoder value that you get out of enc_read() .
The enc_read() returns the encoder count and not the distance in cm. 18 of the counts make 1 rotation of the wheel. You can just divide the circumference of the wheel that you are using with 18 to get the distance in cm. The wheel that comes with the GoPiGo is has a radius of ~30-32mm. Which gives the circumference of 18-20 cm. If you just divide this by the counts which is 18, the distance per count roughly comes to 1cm.