35 lines
873 B
C++
Executable File
35 lines
873 B
C++
Executable File
#include <LiquidCrystal_I2C.h>
|
|
/* Pines del chip I2C al Arduino:
|
|
/ VCC -> +5V /
|
|
/ GND -> GND /
|
|
/ SDA -> A4 /
|
|
/ SCL -> A5 */
|
|
// Pines del chip I2C al 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 doc sucks!");
|
|
delay(1000);
|
|
|
|
lcd.setCursor(0, 1);// go to the next line
|
|
lcd.print("just do some Google");
|
|
delay(1000);
|
|
lcd.setCursor(0, 2);// next line
|
|
lcd.print(" funciona ctm!!!!");
|
|
delay(500);
|
|
lcd.setCursor(0, 3);
|
|
lcd.print(" pls! ");
|
|
delay(1000);
|
|
lcd.clear();
|
|
}
|