Sorry,
This code is actuated Gimbal. Once your recording is Gimbal this program is not responding at all, I can only manually calibrate it, but the manual actuation has its flaws (the wires coming out of the gimbal can not be perfectly set). I wanted to check if PID Autotune works with this would be better, but I have a problem with it and do not know what I miss in the program, it does not work. I have microcontroller ATmega328P.