We always think it is interesting that a regular DC motor and a generator are about the same thing. Sure, each is optimized for its purpose, but inefficiencies aside, you can use electricity to rotate ...
#define ENCODER_L 13 // digital pin for reading the Speed sensor Left #define ENCODER_R 18 // digital pin for reading the Speed sensor Right #define SPEED_CALC_PERIOD 50 // in miliseconds ...
We will check the signs of the wheel rotation as measured by the encoders and the motor drivers, and then calibrate the encoders. Use the program test_picoencoder to see if the encoder readings ...