apuntes_Arduino/lcd/i2c/i2c_20x4/i2c_20x4.ino
2022-04-04 17:41:38 -04:00

33 lines
866 B
C++
Executable File

#include <LiquidCrystal_I2C.h>
/* Pines del chip I2C al Arduino:
/ VCC -> +5V /
/ GND -> GND /
/ SDA -> A4 /
/ SCL -> A5 */
// Pins chip I2C a LCD(addr,en,rw,rs,d4,d5,d6,d7,BackLight, BLstatus)
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);// Set the LCD I2C address [0x27 o 0x3F]
void setup() {
//pinMode(BACKLIGHT_PIN, OUTPUT );
lcd.begin(20,4); // initialize the lcd
//digitalWrite(BACKLIGHT_PIN, HIGH );
}
void loop() {
lcd.clear();
lcd.home();//
lcd.print("Sainsmart docs????");
delay(1000);
lcd.setCursor(0, 1);// go to the next line
lcd.print("just Googleit");
delay(1000);
lcd.setCursor(0, 2);// next line
lcd.print(" funciona !!!!");
delay(500);
lcd.setCursor(0, 3);
lcd.print(" XD! ");
delay(1000);
lcd.clear();
}