Quote:
Originally Posted by Mike AA
I guess I am comfused and I have been trying to get an idea on all this. I wish to be able to move the joystick to say a value of 200, then I want on the robot a motor to turn an arm until it also reads another pot at the same angle.
Example:
Joystick tilted slightly forward, thus arm tilted slightly down.
I cant figure out do I use a PID loop or do I just get creative with some other code or use a table? In the past I would just use limit switched but II want better control this year and a more varied location.
-Mike
|
Do a simple proportional control...
Code:
arm_motor = (arm_pot - p1_y) * 50;
dont multiply by 50, multiply by something that actually makes the arm move smoothly.