I’ve been trying to program a potentiometer switch that switches the autonomous program using if statements. Any idea on how to do this in V5 Pro Text? It’d be helpful to know how to do it in PROS too if anyone could help with that.
if(potentiometer_value > number){
//run auto 1
}
else{
//run auto 2
}
6 Likes
The API has everything on potentiometers inside. If you don’t already have this link it should be the single most helpful one.
https://pros.cs.purdue.edu/v5/getting-started/new-users.html
1 Like
For VEXcode Pro V5, you can look at the Doxygen help:
https://api.vexcode.cloud/v5/html/classvex_1_1pot.html
3 Likes
Doing switches like that has won me multiple design awards in middle school. They were more important in the cortex days but they are still good for the V5.