I’ve been writing some autonomous code in PROS, and I was wondering how one would utilize it fully? What output unit is it? I’ve heard it was positional, is this true? Which analog function do you use? Thanks!
Yes, potentiometers are positional in PROS. You can use
to get the current value.
Question #2, What are the units? I’ve read the scale is either 0-4095 or 0-2000ish, but what do they represent?
IIRC, a potentiometer works by varying the amount of current between two discs. As they turn, the resistance increases or decreases, and the microcontroller reads the current. The value returned when you call analogRead is some scaled value determined by a process that I’m not familiar with. In other words, they don’t represent some standard unit, but change linearly as the pot is rotated. It’s kind of like the encoders, where each “tick” doesn’t exactly represent an inch, but is still a fixed distance.
In PROS, the VEX potentiometers read between 0 and 4095.
They’re technically arbitrary. You can use a potentiometer and a protractor, for example, to determine how potentiometer values scale to degrees.