|
Page 1 of 1
|
[ 5 posts ] |
|
how to display stuff on the vex lcd display?
Author |
Message |
themigthy
Rookie
Joined: Wed Dec 21, 2011 4:22 pm Posts: 26
|
 how to display stuff on the vex lcd display?
I am trying out one of the sample code for the vex lcd display, but when I load the program all i get on the vex lcd display is: but 0 0 0 but 0 0 0 the lcd display is connected in the correct port, also i am using a vex y-cable to connect the LCD to the cortex. how can i get it working? Is there some steps i need to do? help! Below is the code I used.  |  |  |  | Code: task main() { bLCDBacklight = true; // Turn on LCD Backlight string mainBattery, backupBattery; while(true) // An infinite loop to keep the program running until you terminate it { clearLCDLine(0); // Clear line 1 (0) of the LCD clearLCDLine(1); // Clear line 2 (1) of the LCD //Display the Primary Robot battery voltage displayLCDString(0, 0, "Primary: "); sprintf(mainBattery, "%1.2f%c", nImmediateBatteryLevel/1000.0,'V'); //Build the value to be displayed displayNextLCDString(mainBattery); //Display the Backup battery voltage displayLCDString(1, 0, "Backup: "); sprintf(backupBattery, "%1.2f%c", BackupBatteryLevel/1000.0, 'V'); //Build the value to be displayed displayNextLCDString(backupBattery); //Short delay for the LCD refresh rate wait1Msec(100); } }
|  |  |  |  |
|
Tue Oct 09, 2012 6:50 pm |
|
 |
JohnWatson
Site Admin
Joined: Thu May 24, 2012 12:15 pm Posts: 722
|
 Re: how to display stuff on the vex lcd display?
This issue normally appears when there is a wiring issue; I tested the code on our testbed and it was able to run it without any problems. Double check to make sure that the LCD screen is plugged into UART2, and that the two wires are plugged into fully to the correct ports (the black-red-yellow wires should be on the left, the black-red-white one on the right). Also, make sure ROBOTC is up-to-date and that you have the latest version of the firmware installed on the Cortex.
_________________Check out our Blog! And our Facebook page! Need help? Take a look at our updated help documentation and the ROBOTC Forums.
|
Wed Oct 10, 2012 4:34 pm |
|
 |
themigthy
Rookie
Joined: Wed Dec 21, 2011 4:22 pm Posts: 26
|
 Re: how to display stuff on the vex lcd display?
Another question do I have you use the y cable to connect the lcd to the cortex? And where in the cortex do I connect the black-red- white cable?
|
Wed Oct 10, 2012 4:48 pm |
|
 |
JohnWatson
Site Admin
Joined: Thu May 24, 2012 12:15 pm Posts: 722
|
 Re: how to display stuff on the vex lcd display?
Are you using the 3-wire motor cable splitter ( http://www.vexrobotics.com/276-1423.html) or the Serial Y Cable ( http://www.vexrobotics.com/276-1579.html)? You can't use the first one with the VEX LCD screen; it is used to drive multiple motors/servos with at the same levels/positions from one port. The second cable, the Serial Y cable, will allow you to connect to the VEX LCD screen. The 4-prong (Black, Red, Yellow, White) will plug into the UART2 port on the Cortex. The Receive cable (Black, Red, Yellow) goes into the port labeled on the screen as RX. The Transmit cable (Black, Red, White) goes into the port labeled on the screen as TX. There is a close-up view of the RX/TX ports one VEX's website: http://www.vexrobotics.com/media/catalo ... ottom.jpeg
_________________Check out our Blog! And our Facebook page! Need help? Take a look at our updated help documentation and the ROBOTC Forums.
|
Thu Oct 11, 2012 4:49 pm |
|
 |
themigthy
Rookie
Joined: Wed Dec 21, 2011 4:22 pm Posts: 26
|
 Re: how to display stuff on the vex lcd display?
I using the 3 wire motor cable splitter. That's probably the problem.
|
Thu Oct 11, 2012 7:10 pm |
|
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|