Example #1
0
// Sets the cursor to the given position 
// line 1: 0-15, line 2: 16-31, 31+ defaults back to 0
void Lamp::goTo(int position) {
  if (position < 16) { 
    serCommand();   //command flag
    Serial1.write((position+128));
  } 
  else if (position < 32) {
    serCommand();   //command flag
    Serial1.write((position+48+128));
  } 
  else { 
    goTo(0); 
  }
}
Example #2
0
void LCD_Display::position(int row, int col) 
{
  serCommand();   //command flag
  _LCD->write(0x80);	// set cursor position command
  if (row == 2)
    col = col + 16;
    
  _LCD->write(col);
  //LCD.write((col + row*64 + 128));    //position 
  delay(LCDdelay);
}
Example #3
0
// Resets the display
void SerialLCD::clear() 
{
  serCommand();
  print(0x01, BYTE);
} 
Example #4
0
void SerialLCD::sleft() 
{
  serCommand();
  print(0x18, BYTE);
} 
Example #5
0
void SerialLCD::sright() 
{
  serCommand();
  print(0x1C, BYTE);
} 
Example #6
0
void SerialLCD::nounderline() 
{
  serCommand();
  print(0x0C, BYTE);
} 
Example #7
0
void SerialLCD::noblink() 
{
  serCommand();
  print(0x0C, BYTE);
} 
Example #8
0
void SerialLCD::blink() 
{
  serCommand();
  print(0x0D, BYTE);
} 
Example #9
0
void SerialLCD::goToLineTwo()
{  //puts the cursor at line 0 char 0.
   serCommand();   //command flag
   print(192, BYTE);    //position
}
Example #10
0
void Lamp::hideCursor()
{
  serCommand();
  Serial1.write(0x0C);

}
Example #11
0
void Lamp::showCursor()
{
  serCommand();
  Serial1.write(0x0E);

}
Example #12
0
// Resets the display, undoing any scroll and removing all text
void Lamp::clearLCD() {
  serCommand();
  Serial1.write(0x01);

}
Example #13
0
// Starts the cursor at the beginning of the second line (convienence method for goTo(16))
void Lamp::selectLineTwo() {  //puts the cursor at line 0 char 0.
  serCommand();   //command flag
  Serial1.write(192);    //position
}
Example #14
0
void LCD_Display::shiftLeft() {
  serCommand();
  _LCD->write(0x18);
  delay(LCDdelay);
}
Example #15
0
void LCD_Display::shiftRight() {
  serCommand();
  _LCD->write(0x1c);
  delay(LCDdelay);
}
Example #16
0
void LCD_Display::clear() 
{
  serCommand();   //command flag
  _LCD->write(0x01);   //clear command.
  delay(LCDdelay);
}