Here you can find the code, electronics schematics and any 3d printing related to this project. An early proof of concept sketch on wokwi is available here. This is based on a Nano type board but you ...
This code uses a PID control loop for the DC motor with built-in encoder and utilizes external interrupts to count the encoder pulse. Timer 1 is also being used to provide an updated target count ...