Last active
June 5, 2020 14:13
-
-
Save atchoo78/eb0b89c373ecd1fdb04354737cf20bdf to your computer and use it in GitHub Desktop.
LiquidCrystal I2C - LCD display on Arduino Yún
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
// 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