Advertisement
Guest User

Code for LCD

a guest
Nov 17th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #include <Wire.h>
  2. #include <LiquidCrystal_I2C.h>
  3.  
  4. // Set the LCD address to 0x27 for a 16 chars and 2 line display
  5. LiquidCrystal_I2C lcd(0x27, 16, 2);
  6.  
  7. void setup()
  8. {
  9. // initialize the LCD
  10. lcd.begin();
  11.  
  12. // Turn on the blacklight and print a message.
  13. lcd.backlight();
  14. lcd.print("Hello, world!");
  15. }
  16.  
  17. void loop()
  18. {
  19.  
  20. lcd.clear();
  21. delay(20);
  22.  
  23. for (int i=0; i<16; i++)
  24. {
  25.  
  26. lcd.setCursor (i,0);
  27. lcd.print ("and i oop");
  28. lcd.setCursor (i,1);
  29. lcd.scrollDisplayLeft();
  30. lcd.print ("skskskkskskks");
  31. delay (500);
  32. lcd.clear();
  33.  
  34. }
  35. //lcd.scrollDisplayRight ();
  36. // lcd.autoscroll ();
  37. //lcd.print ("Suarez");
  38. // delay (50);
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement