Here's a quick example demonstrating how to change the setpoint of the position control loop:
This motion was implemented as shown below. "r" is our global setpoint variable. Since the control loop is implemented using interrupts, you don't really have to worry about it in your main loop once it is enabled!
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
When my motor reach the setpoint, it overshoot and start being unstable. Do you have any quick fix for that ???
Is it something bad in the calibration or in the PID settings ?
Are you sure? yes | no