Skip to content

Instantly share code, notes, and snippets.

@cbscribe
Created April 15, 2021 16:25
Show Gist options
  • Save cbscribe/3e8685c5f4e5e3fdcd3fb49e21689540 to your computer and use it in GitHub Desktop.
Save cbscribe/3e8685c5f4e5e3fdcd3fb49e21689540 to your computer and use it in GitHub Desktop.
Example Arduino + LCD
#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