Skip to main content

Topics

This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.

Topics - gnomishworks

1
USB serial LCD backpack / Arduino and Serial connection
Can't get the Seeeduino LCD backpack to work with serial. Not even the backlight works..

void setup() {
  Serial1.begin(9600);
}

void loop() {
  // Example usage:
  clearLCD();
  backlightOn();
  //Print text on each line
  selectLineOne();
  delay(100);
  Serial1.print("Line One");
  delay(500);
  backlightOff();
}
//Serial1LCD Functions
void selectLineOne(){  //puts the cursor at line 0 char 0
  Serial1.write(0xFE);  //start command flag
  Serial1.write(0x47);  //position
  Serial1.write(2);    //position
  Serial1.write(0x9A);  //end command flag
}
void clearLCD(){
  Serial1.write(0xFE);  //start command flag
  Serial1.write(0x58);  //clear lcd command
  Serial1.write(0x9A);  //end command flag
}
void backlightOn(){  //turns on the backlight
  Serial1.write(0xFE);  //start command flag
  Serial1.write(0x42);  //backlight on
  Serial1.write(30);  //Stay on for 30 min 
  Serial1.write(0x9A);  //end command flag
}
void backlightOff(){  //turns off the backlight
  Serial1.write(0xFE);  //start command flag
  Serial1.write(0x46);  //backlight off 
  Serial1.write(0x9A);  //end command flag
}
void backlight50(){  //sets the backlight at 50% brightness
  Serial1.write(0xFE);  //start command flag
  Serial1.write(0x98);  //backlight brightness
  Serial1.write(128);    //backlight level
  Serial1.write(0x9A);  //end command flag
}

Any ideas?
Thanks

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01162250048session_write_close ( )...(null):0
20.01192381640ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01192382416Database_MySQL->query( ).../DatabaseHandler.php:119
40.05522521152Database_MySQL->error( ).../Db-mysql.class.php:273