Tutorials/VEX LCD Characters
(Created page with "<yambe:breadcrumb self="VEX LCD Characters">Tutorials|Tutorials</yambe:breadcrumb> <br /> {| width="740px" |- |VEX LCD |style="vertical-al...") |
|||
| Line 10: | Line 10: | ||
What many programmers don’t know, is that there’s a wider selection of symbols that can be displayed with the LCD! Shown below is a full list of characters that can be displayed, along with their numerical equivalents, in a useful table Matthieu put together. | What many programmers don’t know, is that there’s a wider selection of symbols that can be displayed with the LCD! Shown below is a full list of characters that can be displayed, along with their numerical equivalents, in a useful table Matthieu put together. | ||
| − | | | + | |} |
| − | + | <br /> | |
| + | Full character look-up table:<br /> | ||
[[Image:vex-lcd-table.png|VEX LCD character set]] | [[Image:vex-lcd-table.png|VEX LCD character set]] | ||
You can download a printable PDF of the table, along with some additional notes, [[File:VexLCDcharList.pdf|here]]. | You can download a printable PDF of the table, along with some additional notes, [[File:VexLCDcharList.pdf|here]]. | ||
| − | + | ||
| − | + | ||
To display any of these custom characters, you should use either the <span class="keywordB">displayLCDChar</span><span class="codePunc">();</span> or <span class="keywordB">displayNextLCDChar</span><span class="codePunc">();</span> commands as you normally would, but specify the numerical value instead of an actual character in single quotes. For example, the following code will display a right arrow on the very first position (0,0) on the LCD: | To display any of these custom characters, you should use either the <span class="keywordB">displayLCDChar</span><span class="codePunc">();</span> or <span class="keywordB">displayNextLCDChar</span><span class="codePunc">();</span> commands as you normally would, but specify the numerical value instead of an actual character in single quotes. For example, the following code will display a right arrow on the very first position (0,0) on the LCD: | ||
Revision as of 12:35, 4 May 2012
| Full credit for the work behind this post goes to ROBOTC user Matthieu V. Thanks Matthieu!
The VEX LCD is a fantastic tool, allowing you to display messages and values on the robot with very little effort. Some programmers even use a combination of the screen and input buttons to create a basic user interface on their robots – allowing them to choose between multiple autonomous routines, choose a specific sensor and display its values, and more. What many programmers don’t know, is that there’s a wider selection of symbols that can be displayed with the LCD! Shown below is a full list of characters that can be displayed, along with their numerical equivalents, in a useful table Matthieu put together. |
Full character look-up table:
You can download a printable PDF of the table, along with some additional notes, File:VexLCDcharList.pdf.
To display any of these custom characters, you should use either the displayLCDChar(); or displayNextLCDChar(); commands as you normally would, but specify the numerical value instead of an actual character in single quotes. For example, the following code will display a right arrow on the very first position (0,0) on the LCD:
task main() { //Create and initialize variable x //Value stored in x must be between 16 and 255 int x = 199; //Clear Line 0 clearLCDLine(0); //Display the character associated with the value in x displayLCDChar(0, 0, x); //Wait 5 seconds before the program ends, clearing the screen wait1Msec(5000); }
