Skip to content

Instantly share code, notes, and snippets.

@e-Gizmo
Created October 26, 2018 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save e-Gizmo/b85cf85499032998ed817fef3e9dff63 to your computer and use it in GitHub Desktop.
Save e-Gizmo/b85cf85499032998ed817fef3e9dff63 to your computer and use it in GitHub Desktop.
Serial LCD II Library example.
/*
Hello World Sketch
On this sample, we will display a simple
message on the lcd, to print, printOver,
clear and scrolling.
Using gizDuino LIN-UNO (Arduino UNO).
See the Keyword.txt for more syntax.
Codes by
e-Gizmo Mechatronix Central
http://www.e-gizmo.net
October 24,2018
*/
#include <eGizmo_SerialLCD.h>
//For Arduino UNO or Gizduino V users
/*
SoftwareSerial mySerial(2,3);
eGizmo_SerialLCD mainDisplay(&myserial);
*/
//For MEGA, X, and Plus users
eGizmo_SerialLCD mainDisplay(&Serial, 4, 20); //Set to 4x20 LCD
void setup(){
//Initialize
mainDisplay.begin();
//mainDisplay.print(message, row, column);
//note: you can place your message/row/column in any positions
mainDisplay.print("Hello", 1,6);
mainDisplay.print("World!", 2,6);
delay(2000); //2 seconds delay time
mainDisplay.printOver("EVERYONE!", 2,6);
delay(2000); //2 seconds delay time
//Clear all
mainDisplay.clear();
delay(2000); //2 seconds delay time
mainDisplay.scroll(1,"1234567890.,?!ABCDEFGHIJKLMNOPQRSTUVWXYZ"); // Message Scrolling from left to right on the 1st row
delay(1000); //1 sec delay time
mainDisplay.scroll(2,"e-Gizmo Mechatronix Central"); // Message Scrolling from left to right on the 2nd row
mainDisplay.print("SerialLCD Sample", 3,0); //Display message on 3rd row
mainDisplay.print("**4x20 & 2x16 LCD**", 4,0); //Display message on 4th row
}
void loop(){
// Add your codes here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment