Skip to content

Instantly share code, notes, and snippets.

@clive520
Last active May 14, 2018 03:44
Show Gist options
  • Save clive520/bea5d4798d1e2272dd83e44a7d55d7f1 to your computer and use it in GitHub Desktop.
Save clive520/bea5d4798d1e2272dd83e44a7d55d7f1 to your computer and use it in GitHub Desktop.
LCD 2004A Display
// 接線 GND==>GND VCC==>5V SDA==>A4 SCL==>A5
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4);
void setup()
{
lcd.begin();
lcd.setCursor(0, 0);
lcd.print("12345678901234567890");
lcd.setCursor(0, 1);
lcd.print("This is Line 2!");
lcd.setCursor(0, 2);
lcd.print("This is Line 3!!");
lcd.setCursor(0, 3);
lcd.print("This is Line 4!");
}
void loop()
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment