Our team has a clamp/latch on the back of our robot and there has been a problem where it rotates too far back is there any way to kind of clamp the rotation so it can’t rotate past a certain point like 90 degrees. maybe like this?:
void clampRot(){
if(Motor.rotation == 90){
Motor.stop
}
}
I tried something along those lines and it didn’t work.
(I’m using vex code pro C++)
yes I have tried motor.rotation(degrees) the code I put in the question was just a
concept not the actual code I tested. Also I thought about adding a limit switch but I think there is probably a way to do this in code.