LCD_LINE#
Posted: 18 Nov 2012, 17:31
How can I Right text to the LCD using a Variable Line #
I'm building a fun little project and will be trying to build a menu to jog 6 motors. Axis 1-6. My plan is to use the Enter BTN to select what axis the arrow buttons will drive
> Axis 1
Axis 2
Axis 3
Axis 4
Axis 5
Axis 6
I'm still early in the code Maybe I'm going the totally wrong way
I'm building a fun little project and will be trying to build a menu to jog 6 motors. Axis 1-6. My plan is to use the Enter BTN to select what axis the arrow buttons will drive
> Axis 1
Axis 2
Axis 3
Axis 4
Axis 5
Axis 6
I'm still early in the code Maybe I'm going the totally wrong way
Code: Select all
int currentline; //Current line pointer Memory
task myDrawScreen()
{
ClearScreen();
TextOut(12, LCD_LINE1, "6 Axis Robot" , 0x0000);
TextOut(1, LCD_LINE2, "> Axis 1" , 0x0000);
TextOut(1, LCD_LINE3, " Axis 2" , 0x0000);
TextOut(1, LCD_LINE4, " Axis 3" , 0x0000);
TextOut(1, LCD_LINE5, " Axis 4" , 0x0000);
TextOut(1, LCD_LINE6, " Axis 5" , 0x0000);
TextOut(1, LCD_LINE7, " Axis 6" , 0x0000);
currentline =2;
}
task myMenuPointer()
{
while (true)
{
if (ButtonPressed(BTNCENTER, true))
{Wait(1000);
TextOut(1, LCD_LINE2, " Axis 1" , 0x0000);
TextOut(1, LCD_LINE3, "> Axis 2" , 0x0000);
currentline = currentline +1;
NumOut(1, LCD_LINE8, currentline , 0x0000);
}
}
}
task main()
{
Precedes(myDrawScreen, myMenuPointer);
}