lcd module vex factory
VEX Robotics is educational robotics for everyone. VEX solutions span all levels of both formal and informal education with accessible, scalable, and affordable solutions. Beyond science and engineering principles, VEX encourages creativity, teamwork, leadership, and problem solving among groups. It allows educators of all types to engage and inspire the STEM problem solvers of tomorrow!
The VEX ARM® Cortex®-based Microcontroller coordinates the flow of all information and power on the robot. It has built in bi-directional communication for wireless driving, debugging and downloading using the VEXnet wireless link. The Microcontroller is the brain of every VEX robot.
VEXnet devices contain internal processors and run on special software called Firmware (or Master Code). Firmware is updated periodically to provide additional functionality or fix bugs. To fully unlock the potential of VEX Robotics VEXnet devices, it"s important to ensure that all applicable drivers are installed and firmware is updated.
After successfully creating a project in VEXcode V5 to move the arm mounted on the VEX V5 Workcell, it is time to examine things closer and relate them to the industrial robots used in manufacturing. In this reading we will explore the following topics: a manufacturing robot’s controller, operating systems, motion control, and robot dynamics.
To try to resolve this issue, please remove and reinsert the Robot Battery into the Robot Brain. Ensure the Robot Brain is off. Then hold down both the Up and Down buttons on the Robot Brain while turning the Robot Brain on via the Check button. The LCD should display the following text:
Now connect the Robot Brain to your computer with the USB cable, and open the VEX IQ Firmware Update Utility application. Click on the Update button on the Robot Brain row to reinstall current firmware to the Robot Brain.
We love the LCD screen. Really. It is one of our favorite tools. Here’s a more technical run-down of the uses that the girls mention in their STEM Educational Video that they entered this week in the REC Foundation’s 2017 Online Challenge.
First, you need to buy yourself an LCD screen, and a Serial Y Cable. NOTE: the cable does not come with the screen, even though it seems like it should. You must buy it separately. You can use up to 2 LCD screens on your robot at one time, though honestly I’ve never seen anyone use 2.
Plug the 4-prong end of the Y-cable into either UART1 or UART2 on the Cortex (remember which one you use; convenient to always use UART1, unless you have a specific reason not to). This plug is over on one corner of the Cortex, near where motor encoders get plugged in. You’ll plug the other wires into the LCD screen. We have a little mnemonic to remember which wires go into which plug: whiTe goes into TX (over-emphasize the “T” when you say “white”), and yell-ER goes into RX (pronouncing “yellow” with a southern drawl). If they are plugged in backward, it will not work.
Make sure your kids install the LCD on the robot (a) where it’s easily accessible to read the screen and press the buttons, and (b) also protected from being struck by game elements or other robots.
(Much of this programming information is in easyC, because that’s what we used at the time of this writing. The exact function names used in RobotC can be found on the RobotC help page, under Command Library – VEX Cortex / ROBOTC / LCD Display.
As a first test to make sure your screen is working, include in your program (autonomous, joystick, or competition) a line of code that just displays a message, and does nothing else. You’ll need to initialize the LCD screen at the start of the program, and somewhere before you have the message display, it’s helpful to make the back-light turn on.
In EasyC, you need to use one LCD display block for each line of the LCD screen that you want to use. Drag over a block and enter the text for your Line 1 message, and leave all of the other stuff blank (the stuff related to variables, etc.); do the same for Line 2 if you’re using it. NOTE: If you put a message on Line 2, and later in your program display a different message, but only use Line 1 at that time, the Line 2 text will remain on the screen unless you specifically drag over a block and tell Line 2 to display a blank line.
Enter the LCD screen! You can put somewhere in your Main() loop a get command to get the latest sensor value and then an LCD command to display it on the screen. If it’s a variable you’re after, just make sure that the LCD display command is somewhere after the variable is being calculated.
Beware! Each line of the LCD screen can only hold 16 characters. If you give it text that’s 14 characters, plus a 3-digit sensor value, the LCD will show you the first 2 digits of your sensor value, and will just cut off/not display the 3rd digit. So you may think that you’re getting sensor data just fine, but at some point it will look like the numbers wrap around and restart their numbering at 0 again. It will look like it has wrapped around to, say, “11”, when the sensor value is really 110.
Beware some more (RobotC users)! When displaying sensor values on the screen—especially in a while loop—be sure to clear the existing text before displaying the sensor’s value. We were trying to calibrate our gyro sensor recently, and when we turned the robot around 360º, the value in RobotC is supposed to reset to 0, but on our robot, once we passed 3599 (the gyro reports values in tenths-of-a-degree, so 360º = 3600), it would jump to 1599, and then if we kept turning it, the values got ridiculously huge—3299, 9099, etc. Whaaaaa??? After half of a meeting devoted to this problem, we realized that once we passed 0, it was in fact displaying the new degree values, starting in the left-most position on top of what was already there, so what we were reading as 1599 was really a sensor value of 15, written on top of the previous value of 3599. So we added a line of code inside the while loop to clear the first line of the LCD display and then write the sensor value. (This appears to be only a RobotC problem; easyC is fine with the blocks of code shown above, without an extra block for clearing the line.)
One other use where we find the LCD to be valuable is debugging our programs. There are many times when a program is not working, and you just can’t figure out what is actually executing in the code. You’ve got some code that seems like it should be doing the right thing, but nothing is happening.
You could put different messages in different sections of your code, but be aware that a joystick program is looping through rapidly, and if you have Message1 display when x happens, and then Message2 display when y happens, Message1 may display for a tiny fraction of a second, and then be over-written by Message2. It’s good to stick with at most 2 non-exclusive messages, each of which occupies one line of the LCD screen (so that they can both display at the same time if necessary).
Our FAVORITE use of the LCD is as a little menu-selector to choose an autonomous program during a competition. If you’ve got an autonomous program that involves moving left or right, you’ve undoubtedly got 2 of them, depending on what square your robot starts in. In one scenario it’ll need to move left, but if it starts in the other colored starting square for that alliance team, it’ll need to move right.
Without the LCD screen, your team needs to find their alliance partner, decide who’s going to start where (and communicate clearly what they mean by “start on the left square,” for example), and then go back to the pits and load the correct program onto the robot. Let me tell you how many times I have seen this result in the wrong program on the robot—20% of the time, maybe? Your team could lose a match without those autonomous points, and it’s incredibly frustrating for the kids to have their perfect code work backward when the clock starts. So why not remove 99% of human error and have a little menu selector on the robot itself! That way your team never has to load a program on the robot all day long at a competition. We even include our programming skills challenge code as one of the menu items, so we rarely have to open up the computer at a tournament.
You can download EasyC code (or pseudo-code) on our downloads page that will get you started creating your own menu (full credit goes Ephemeral_Being from the VEX forum for writing this code). Important notes, as the girls mention in their video:
Edit 7/2/18: Here’s a very clear and helpful YouTube tutorial on programming your own auton menu selector in easyC. There are many RobotC examples of this type of code on the VEX Forum; a simple search will find some for you. You can also read my detailed post that walks you through how Ephemeral Being’s code works.