Created
April 15, 2021 16:25
-
-
Save cbscribe/3e8685c5f4e5e3fdcd3fb49e21689540 to your computer and use it in GitHub Desktop.
Example Arduino + LCD
This file contains hidden or 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
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); | |
void setup() | |
{ | |
// Set the size of the display | |
lcd.begin(16, 2); | |
// Print out some text | |
lcd.print("This is a really long line."); | |
// Move the cursor | |
// lcd.setCursor(4, 1); | |
// lcd.print("foo"); | |
} | |
int n = 0; | |
void loop() | |
{ | |
// scroll the whole display | |
lcd.scrollDisplayLeft(); | |
delay(500); | |
// countdown in the bottom left corner | |
// lcd.setCursor(0, 1); | |
// lcd.print(n); | |
// delay(1000); | |
// n++; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment