I am currently working on a quadcopter in which I want help in setting up my PID.
I am trying to get output from the PID loop by giving input from MPU6050's (accelerometer and gyro) pitch value. The pitch value from the MPU6050 is given to PID loop, but I am not getting any output from the loop. I have set the setpoint as 0, and the output from the MPU6050 ranges between -90 to +90(this is the PID input).
My code for PID:
float input, output, setpoint=0; PID* myPID(&input, &output, &setpoint, 2, 5, 1, REVERSE);
Then I am printing the output values but am getting only 0 whatever the input from MPU6050.