Created
October 24, 2018 09:53
-
-
Save e-Gizmo/a08e0cf4ebb2db2170f58470ab4f6fc0 to your computer and use it in GitHub Desktop.
Serial LCD II demo & other features
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Digital Pins Sketch | |
On this sample, we will use the digital pins of | |
Serial LCD II at the same time with display message on it. | |
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, 2, 16); //Set to 2x16 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,"MERRY CHRISTMAS 2018!!!"); // Message Scrolling from left to right on the 1st row | |
delay(1000); //1 sec delay time | |
mainDisplay.scroll(2,"FROM: 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 | |
for(int i = 0; i <=10; i++){ | |
mainDisplay.pinMode(i,OUTPUT); | |
} | |
} | |
void loop(){ | |
// Add your codes here | |
for(int i = 0; i<=10;i++){ | |
mainDisplay.digitalWrite(i, HIGH); | |
delay(200); | |
mainDisplay.digitalWrite(i,LOW); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment