Difference between revisions of "Tutorials/VEX LCD Characters"

From ROBOTC API Guide
Jump to: navigation, search
(Created page with "<yambe:breadcrumb self="VEX LCD Characters">Tutorials|Tutorials</yambe:breadcrumb> <br /> {| width="740px" |- |VEX LCD |style="vertical-al...")
 
 
(5 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
 
<yambe:breadcrumb self="VEX LCD Characters">Tutorials|Tutorials</yambe:breadcrumb>
 
<yambe:breadcrumb self="VEX LCD Characters">Tutorials|Tutorials</yambe:breadcrumb>
 
<br />
 
<br />
Line 10: Line 11:
  
 
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.
|-
+
|}
|Full character look-up table:<br />
+
<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, [[Media:VexLCDcharList.pdf|VexLCDcharList.pdf]].
|}
+
 
<br />
+
  
 
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:

Latest revision as of 18:38, 7 May 2012

Tutorials → VEX LCD Characters


VEX LCD
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, 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);
}