I am wondering if a PID controller is the correct way to implement a stabilizer for a camera or any device. If I were to shake the device up and down and want to cancel out the movements by accelerating in the opposite way using a motor and linear actuator, would a pid controller work? I can collect real time data in Arduino or input a giant array of acceleration data.
I wanted to base it off of this lab. https://www.pdx.edu/nanogroup/sites/www.pdx.edu.nanogroup/files/2013_Arduino%20PID%20Lab_0.pdf
Its a circuit which uses a pid controller to keep the dimness of a light bulb the same brightness regardless of the amount of resistance you apply with the potentiometer.
The code confuses me because it changes the set point everytime. I thought a pid controller has an input , a desired output, and the output each iteration. why would the set point change?
Thanks for any help! I made sure to read every pid thread on here.