Skip to content

Instantly share code, notes, and snippets.

@atchoo78
Last active June 5, 2020 14:13
Show Gist options
  • Save atchoo78/eb0b89c373ecd1fdb04354737cf20bdf to your computer and use it in GitHub Desktop.
Save atchoo78/eb0b89c373ecd1fdb04354737cf20bdf to your computer and use it in GitHub Desktop.
LiquidCrystal I2C - LCD display on Arduino Yún
// Note: Connect SCL and SDA from the LCD to SCL & SDA on the Yun (closest to the ethernet port).
// You can also use digital 2 and 3, but I won't recommend it if you want a reliable serial port connection.
// In general: 16 chars, 2 or 4 lines of text: 0x27
// 20 chars, 4 lines of text: 0x3F
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
lcd.begin();
lcd.setCursor(0,0);
for (int pos = 0; pos < 15; pos++) {
lcd.print(pos);
}
}
void loop() { // do nothing here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment