Quote:
Originally Posted by PriyankP
So it would be something like target = currentPotValue + (Yaxis * 5) right?
|
Yaxis is your setpoint and (m*currentPotValue+b) is your process variable.
Adjust the gain "m" and the offset "b" so that your process variable corresponds to your Yaxis output.
Then,
error = setpoint - process_variable;
motor_voltage_command = Kp*error;
Kp is your proportional gain which you tune for the desired response.