Potentiometer

I am currently having problems with the arm on my robot because it keeps falling down from where i set it with my program and I want to use a Potentiometer to fix that but I don’t know how to program one can someone help me

You could use a simple P controller. Try something like this:


while(true)
{
     motor[liftmotor] = 0.3*(value - sensorvalue[potentiometer]);
     if(vexRT[button] == 1)
     {
          value++;
     }
     if(vexRT[otherbutton] == 1)
     {
           value--;
     }
}

thanks

No problem, happy to help! Let me know if it has any problems.