//Geworkian Michael. (+ Mega's sketch of Abran551)
// scroll & back
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16,2);
void setup() { lcd.init(); lcd.backlight();
lcd.print("Arduino"); //Ср. с Тинкер.
//lcd.setCursor(0, 0); lcd.print("Hello");
//lcd.setCursor(0, 1); lcd.print("Wokwi");
}
void loop() {
// lcd length is 16 scrollToRight ПаузаЛишняя
for(int positionCounter = 0; positionCounter < 16; positionCounter++) {
delay(150); lcd.scrollDisplayRight();
// Сдвиг координат. Вызов 40 раз возвр. исх координату
}
/* Approx. lcd length - string, 16-7=11 scrollToLeft
for(int positionCounter = 0; positionCounter < 13; positionCounter++) {
lcd.scrollDisplayLeft(); delay(150);
}
// lcd length + string, i.e. over edge 16+7=23 scrollToLeft
for(int positionCounter = 0; positionCounter < 29; positionCounter++) {
lcd.scrollDisplayRight(); delay(150);
}
delay(300); */
}