52 lines
865 B
C++
Executable File
52 lines
865 B
C++
Executable File
#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);
|
|
}
|