Quote:
Originally Posted by mtnteam
I have an encoder hooked up along with a motor. The encoder reads the motor fine. But, I'm stuck on how to use the the output of the encoder with the motor. So lets say i press button 10 on the joystick. Than it tells the motor to only spin 1/4 a rotation, or 90 degrees. I've been trying every possible idea that i had. Any help is greatly appreciated.
|
Use a PID (or any other feedback controller) with encoder signal as process variable, and the setpoint established as follows:
Every time the leading edge of a button press is detected, increment the setpoint by 90 degrees.
What are you using this for?