What would a piece of code look like for a potentiometer in a competition program, both for a controller channel and for autonomous?
Are you running RobotC or EasyC?
For RobotC it will be
SensorValue(Sensor Name)
This would return the value of the pot and then they could make decisions based off of this value.
if(SensorValue(Sensor Name)>100) would be an example of that decision making process.
In easyC it is similar but with get sensor value blocks like shown in the link below
Which programming language are you using?
RobotC is the programming language, that we are using.
Does the code I wrote make any sense. Basically you treat the sensor value like any other variable and compare it using if statements.
Okay it does, you asked what language we were using…Thanks for the help
Ok not exactly working in my code, what else can I do to make it work?
Please show us your code so we can help.