apuntes_Arduino/lcd/i2c/i2c_20x4/i2c_20x4.ino

33 lines
866 B
Arduino
Raw Normal View History

2021-01-05 00:15:16 -03:00
#include <LiquidCrystal_I2C.h>
/* Pines del chip I2C al Arduino:
/ VCC -> +5V /
/ GND -> GND /
/ SDA -> A4 /
/ SCL -> A5 */
2022-04-04 17:41:38 -04:00
// Pins chip I2C a LCD(addr,en,rw,rs,d4,d5,d6,d7,BackLight, BLstatus)
2021-01-05 00:15:16 -03:00
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);// Set the LCD I2C address [0x27 o 0x3F]
void setup() {
2022-04-04 17:41:38 -04:00
//pinMode(BACKLIGHT_PIN, OUTPUT );
lcd.begin(20,4); // initialize the lcd
//digitalWrite(BACKLIGHT_PIN, HIGH );
2021-01-05 00:15:16 -03:00
}
void loop() {
2022-04-04 17:41:38 -04:00
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();
}