Last active
June 5, 2020 14:24
-
-
Save atchoo78/b27a21f9ffd55381088f06d9718e8550 to your computer and use it in GitHub Desktop.
LiquidCrystal I2C - LCD display test on Arduino Uno
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: I recommend connecting SCL and SDA from the LCD to Analog 4 & 5 on the Uno. | |
// You can also use the SCL and SDA ports (near the USB). | |
// In general: 16 chars, 2 or 4 lines of text: 0x27 | |
// 20 chars, 4 lines of text: 0x3F | |
// But remember that most of these i2c adapters are addressable | |
#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