39 lines
676 B
C++
39 lines
676 B
C++
#include <Wire.h>
|
|
#include <LiquidCrystal_I2C.h>
|
|
|
|
// Set the LCD address to 0x27 for a 16 chars and 2 line display
|
|
LiquidCrystal_I2C lcd(0x3F, 20, 4);
|
|
|
|
void setup()
|
|
{
|
|
// initialize the LCD
|
|
lcd.begin();
|
|
|
|
// Turn on the blacklight and print a message.
|
|
char b[4][20] = {{"Hallo "},{"Arduino A"},{"Liquid B"},{"Crystal "}};
|
|
print(b);
|
|
delay(1000);
|
|
}
|
|
|
|
void loop()
|
|
{
|
|
|
|
}
|
|
|
|
void print(char a[4][20]) {
|
|
//cange row 2 & 3
|
|
for(int i = 0; i < 20; i++) {
|
|
int j = a[1][i];
|
|
a[1][i] = a[2][i];
|
|
a[2][i] = j;
|
|
}
|
|
|
|
lcd.clear();
|
|
lcd.blink();
|
|
lcd.setCursor(0,0);
|
|
delay(2000);
|
|
lcd.print(a[0]);
|
|
lcd.noBlink();
|
|
}
|
|
|