We need help!!! One, we can’t make sense of the LCD Programming examples on ROBOTC, and two, our programming skills are low. Any examples someone can share? Much appreciated!!!
I think if you come to us with a problem you want to solve specifically it would be easier to help you. if you want to know how to just make something display on the screen or use it to select a autonomous would be good examples and we can get you on the right path.
Yes, sorry for my demanding tone. We are attempting to chose autonomous programs via the LCD.
Looks like you asked this question before.
https://vexforum.com/t/lcd-programming/24592/1
Were the links in that post not helpful?
What about this one.
https://vexforum.com/showpost.php?p=338646&postcount=7
Perhaps that was too complex, I will try and post something simple in the next couple of days.
It indeed does appear another team member has submitted the question on this account, sorry. But yes those new documents helped clear out several questions we had. Thanks for all the help and Happy Thanksgiving!!
i am not a programmer but i have an idea of whats happening
oh no its just that not everyone would want to tell you everything there is to know about the lcd code
so i went into the sample code and went into the code chooser
you can take the variables at the top and also the wait for press and wait for release these will just append the program until you select something then it will continue. same as the wait for release is saying when the buttons dont equal 0 continue.
clearLCDLine just clears the line that you select
]]]]]]]]]]]]]]]]]]
]]000000000000000000000]] <- this is your 0 line
]]111111111111111111111]] <- this is your 1 line
]]]]]]]]]]]]]]]]]]
next part is the while(nLCDButtons != centerButton)
this is saying keep running as long as a button pressed is not the center button
now comes the switch
switch(count)
{
case 0:
case 1:
case 2:
case 3:
default:
}
above is the basic skeleton for a switch for now the count doesnt mean anything really besides that it starts at zero
breaks “break;” will get you out of the switch if you dont put it it will keep going down into your other cases.
displayLCDCenteredString(0, enter what you want here with " " );
this just displays a string centered on the lcd by first picking the line then entering what you want within the " " and keep it brief or it may not show “programming skills” may not show
now comes the wait for press and it just waits till you do something
here is an if else statement its saying if the left button is pressed go to 3 if the right button is pressed go to the next page.
in the middle as in case 1-2is just go back a page or go to the next page
on the 3rd case it says go back a page or go to 0
so you see the cycle it goes from 0 you can go back to 3 or go forward to 1 and on the third case you can go back to 2 or you can go forward to 0
and default is if you never select anything and the count will go to 0
this is all needed because you will do another switch and it will depend on the switch we did above because when you press the middle button you are saying i want to choose this one be it case 1,2,3, or even default
(by the previous switch you was setting count which will come up again)
now in the beginning of the robot movement it will clear the lcd and the switch will come up again using count and it will run whichever case you assigned it to. and run that part of the code
hope that this helps some things maybe wrong and im sorry but i hope this gives you a slight understanding to the code chooser.
A shameless self-promotion, I know…
I wrote a couple of blog entries on this a while back, and I’d be interested to see if people find them helpful:
Specifically on selecting autonomous modes with the LCD in ROBOTC
The LCD with ROBOTC in general