Advertisement
Guest User

qwerty

a guest
Feb 17th, 2020
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #include <LiquidCrystal.h>
  2.  
  3. LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
  4. void setup() {
  5.  
  6. lcd.begin(16, 2);
  7. lcd.print("hello, world!");
  8. delay(1000);
  9. }
  10.  
  11. void loop() {
  12.  
  13. for (int positionCounter = 0; positionCounter < 13; positionCounter++) {
  14. lcd.scrollDisplayLeft();
  15. delay(150);
  16. }
  17.  
  18. for (int positionCounter = 0; positionCounter < 29; positionCounter++) {
  19.  
  20. lcd.scrollDisplayRight();
  21. delay(150);
  22. }
  23.  
  24.  
  25. for (int positionCounter = 0; positionCounter < 16; positionCounter++) {
  26. lcd.scrollDisplayLeft();
  27. delay(150);
  28. }
  29. delay(1000);
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement