Skip to content

Instantly share code, notes, and snippets.

@moritzmhmk
Created August 16, 2017 20:26
Show Gist options
  • Save moritzmhmk/40acf09059f575d55cc26a688f225564 to your computer and use it in GitHub Desktop.
Save moritzmhmk/40acf09059f575d55cc26a688f225564 to your computer and use it in GitHub Desktop.
LCD
#include <Wire.h>
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
#include <LiquidCrystal_I2C.h>
// addr, En, Rw, Rs, d4, d5, d6, d7, backlight, backlighPolarity
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, 0); // Set the LCD I2C address
void setup()
{
pinMode(A2, OUTPUT);
digitalWrite(A2, LOW);
pinMode(A3, OUTPUT);
digitalWrite(A3, HIGH);
lcd.begin(16,2);
lcd.home ();
lcd.print("Hello,");
lcd.setCursor ( 0, 1 );
lcd.print ("World");
}
void loop() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment