Advertisement
ChaOSzz

Untitled

Feb 23rd, 2022
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <LiquidCrystal_I2C.h>
  2.  
  3. LiquidCrystal_I2C lcd(0x27,16,2);
  4.  
  5. void setup() {
  6.   // put your setup code here, to run once:
  7.   lcd.init();
  8.   lcd.backlight();
  9.   lcd.setCursor(0,0);
  10.   lcd.print("HI");
  11.   lcd.setCursor(0,1);
  12.   lcd.print("World");
  13.   lcd.cursor();
  14.   lcd.blink();
  15.   lcd.setCursor(8,1);
  16. }
  17.  
  18. void loop() {
  19.   // put your main code here, to run repeatedly:
  20.   for(int i = 0;i<16;i++)
  21.   {
  22.     lcd.scrollDisplayRight();
  23.     delay(500);
  24.   }
  25.   for(int i = 0;i<16;i++)
  26.   {
  27.     lcd.scrollDisplayLeft();
  28.     delay(500);
  29.   }
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement