I’m doing multiple autonomous with our robots using the new LCD screens :D. that thing is soooo much fun, I enjoy it as the programmer.
Right now we have a potentiometer with a nob on it that we can point in 5 different positions, and when the nob is pointed in the correct spot, an LED lights up where the nob is pointing. Later we hope to add tape with a short description of what code will run in each position of the nob.
Just curious, have you figured out how to use the buttons?
There is a variable called “nLCDButtons”, which has a number from 0 to 7 depending on which buttons are pressed. The number is 3 bits long, and each bit corresponds to a certain button e.g. 0 = all off, 1 = button 1, 6 = buttons 2 and 3.
Look in the function library on the left under “display” (you may need to set your menu level to expert). There is also a variable “bLCDBacklight” which could be usefull for flashing the backlight for feedback.
Does anyone know if RobotC supports bitwise operators? This would make it a lot easier working with the nLCDButtons variable.
When trying out our LCD and displaying text using displayLCDCenteredString, the text was left aligned. This was using RobotC 2.01 (I haven’t tried it with 2.02 yet). Does this happen for everybody else?
BTW: For anyone still running RobotC 2.01, the virtual competition switch now works in version 2.02.
yes, which is how I have the robot choose it’s autonomous. There is a variable named nLCDButtons. It gives what button was pressed last. there are enums for each button, so thats what you check it with. to check, use kLeftButton, kCenterButton, kRightButton. There are other enums too, but other than the nobutton, I don’t think they are usable with the LCD.
I figured out how to scroll the words