|
Re: global variables and autonomous independent
I think you are wanting to use DS switches to tell the robot what part of the field it is on.
If this is correct, you can read the DS I/O as many times as you like. And it can be stored in a global if that is helpful.
If you only want this info in the autonomous code, the sample code already reads the switch positions and the slider positions on the left. You can use these to tell the robot the field location.
To set the switches, you can either connect the I/O board and attach physical switches using the breadboard or another breakout, or you can leave the I/O board detached and use virtual switches and values onscreen in the I/O tab.
Greg McKaskle
|