apuntes_Arduino/TEST/OK-test-LCD-2004/OK-test-LCD-2004.ino

52 lines
865 B
Arduino
Raw Normal View History

2021-01-05 00:15:16 -03:00
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
void setup() {
lcd.begin(20,4);
}
void loop() {
//lcd.clear();
lcd.setCursor(0, 0);
for (byte x=0; x<20; x++) {
if (x>=10) {
byte y = x-10;
lcd.print(y);
} else {
lcd.print(x);
}
//delay(10);
}
lcd.setCursor(0, 1);
for (byte x=0; x<20; x++) {
if (x>=10) {
byte y = x-10;
lcd.print(y);
} else {
lcd.print(x);
}
//delay(10);
}
lcd.setCursor(0, 2);
for (byte x=0; x<20; x++) {
if (x>=10) {
byte y = x-10;
lcd.print(y);
} else {
lcd.print(x);
}
//delay(10);
}
lcd.setCursor(0, 3);
for (byte x=0; x<20; x++) {
if (x>=10) {
byte y = x-10;
lcd.print(y);
} else {
lcd.print(x);
}
//delay(10);
}
delay(3000);
}