Difference between revisions of "Tutorials/VEX LCD Characters"

Jump to: navigation, search
Line 1: Line 1:
<yambe:breadcrumb self="VEX LCD Characters">Tutorials|Tutorials</yambe:breadcrumb>
<yambe:breadcrumb self="VEX LCD Characters">Tutorials|Tutorials</yambe:breadcrumb>
<br />
<br />

Revision as of 14:57, 7 May 2012

Tutorials → VEX LCD Characters

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:

VEX LCD character set

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
  //Display the character associated with the value in x
  displayLCDChar(0, 0, x);
  //Wait 5 seconds before the program ends, clearing the screen