-
Notifications
You must be signed in to change notification settings - Fork 0
Controlling the LCD
The LCD enables a robot to display sensor data, battery levels, funny messages, etc. as well as have various different autonomous modes to cycle between.
The LCD functionality provided by this library enables the user to display a message during user control and cycle between autonomous modes during pre autonomous.
Your LCD must first be plugged into UART2 on the cortex in order for the following code to work. In config.c:
#define USE_LCD 1
You also need to provide a method void lcdGenerateMessage()
that sets the variables lcdStr1
and lcdStr2
to the values that you want to be displayed. For example:
void lcdGenerateMessage(){
sprintf(lcdStr1, "8900 %4.1fV %4.1fV", getMainBatteryVoltage() / 1000.0, getSecondBatteryVoltage() / 1000.0);
sprintf(lcdStr2, "Parallax");
}
Now, in pre autonomous you will be able to cycle between autoA, autoB, autoC, and prgSkills modes (see how to program autonomous modes here) and in user control the message defined by lcdGenerateMessage()
will be displayed.
Beginner Features:
Intermediate Features:
Advanced Features:
Controlling the LCD
Using Autonomous Modes
Custom Pre Auton Procedure
Using Autonomous Modes in User Control
More Remote Functionality
Configuring Bailout Button
Custom User Control Procedure
PID Control
Drive Train Control