I’m trying to program our robot’s arm to move together in EasyC v4 using a potentiometer while having preset positions. How would I go about doing this if both potentiometers are occupied by the preset arm position program?
Here’s an example for keeping the arms together:
Left_pot = get analog 1 Right_Pot = get analog 2 If left_pot > right_pot: left_lift_motor = 63 If right_pot > left_pot: right_lift_motor = 63
And here’s an example for preset arm positions
left_pot = get analog 1 If btn1: setpoint = 100 If btn2: setpoint = 200 If btn3: setpoint = 300 if setpoint > left_pot: lift_motor = -100 if setpoint < left_pot: lift_motor = 100
As you can see, each sample will occupy a potentiometer.
Also, is there any advantage to having a PID control loop for drive trains during operator control? It doesn’t seem like a human would need a PID control loop assisting them during the operator control.