View Full Version : Reading switches during Autonomous
We plan on setting the autonomous mode from the operator interface. My question is can the Operator Interface be queried (specfiically P3/4 Switch definitions) during the autonomous mode. Obviously, these switches would be set prior to the start of the match and would initialize to the state they are positioned during robot initialization.
Thanks!
D. Sean Kelly
Team #499 - Programming Mentor
KenWittlief
19-02-2006, 14:03
Sort of.
when the robot is disabled it still reads all the inputs (RC and OI), only the outputs are blocked.
When Auton mode begins the robot will not be able to read any inputs from the OI, but if you write your code to remember what the switch settings were while the robot was disabled, you can use those values during auton mode.
Thanks! More last minute testing I guess :)
Sean
Sort of.
when the robot is disabled it still reads all the inputs (RC and OI), only the outputs are blocked.
When Auton mode begins the robot will not be able to read any inputs from the OI, but if you write your code to remember what the switch settings were while the robot was disabled, you can use those values during auton mode.
CarpeDiem
19-02-2006, 16:23
If i put switches on straight to the RC i need ot know is a digital only 0 or 1 with a switch. what i am trying to say if i have a switch in digital 1 and two would i say
if (rc_dig_in01){
rc_dig_in02=0;
}
or what would i use to tell it i dont want digital 2 on.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.