My team has been discussing multiple autonomous modes for our robot this year. We would like to incorporate the LCD screen into our bot. I have gotten familiarized with how the LCD works, but within the competition I would need to have the LCD loop run in a pre-autonomous mode. I know there is a variable that I can put into a while loop to look like so:
while(<variable> == true){
do lcd code
}
By any chance can I get the name of the variable used?
Are you trying to find a way to use the LCD buttons?
For coding the buttons, you’d use nLCDButtons ==
The value is that 1 is the left button, 2 is the middle button, and 4 is the right button. If you want multiple to be added up, for example, both left and middle, you’d add 2 +1 and you have nLCDButtons == 3.
Thanks, I was looking for the vrDisabled variable. I have the autonomous chooser all ready, with the button configuration, I just needed to ensure that it would only run in pre autonomous mode, when the bot is disabled.
Hopefully you read the whole thread, vrDisabled is the wrong variable (actually it’s a constant that’s used with a different function, it will always be 0x80)
I would recommend adding a additional While loop over your LCD selection. We use the addition loop as a “Ready to Go” selection. Basically, at the end of the selection the lcd asks “Are You Ready?” The left button says yes and the right no and the middle does nothing. This is because the middle is what we use to select every other options in our LCD Selection. Basically, if you answer No then the LCD selection starts from the beginning again and if Yes then it ends the While Loop. It’s basically a safe guard if you select the wrong autonomous on accident and saves you from having to restart the robot to re pick the correct one. Just a friendly recommendation
I have tried using this one, but whenever I would run it, it wouldn’t run. This might be because I’m testing it with the software controller(Debugger Windows > Competition Control), so I will try it on the field controller we have and get back to you.