The code linked above includes an encoder to tune the PID values
Controller prototype:
The design of the PCB:
The board was designed to be mounted to the pre-existing frame.
The bluetooth controller is also conected to the PCB to save money
during the manufacturing process.