Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. #include <LiquidCrystal.h>
  2. LiquidCrystal miPantallita(12, 13, 5, 4, 3, 2);
  3.  
  4. void setup() {
  5. // set up the LCD's number of columns and rows:
  6. miPantallita.begin(16, 2);
  7. }
  8.  
  9. void loop() {
  10. // set the cursor to (0,0):
  11. miPantallita.setCursor(0, 0);
  12. // print from 0 to 9:
  13. for (int thisChar = 0; thisChar < 10; thisChar++) {
  14. miPantallita.print(thisChar);
  15. delay(500);
  16. }
  17.  
  18. // set the cursor to (16,1):
  19. miPantallita.setCursor(16, 1);
  20. // set the display to automatically scroll:
  21. miPantallita.autoscroll();
  22. // print from 0 to 9:
  23. for (int thisChar = 0; thisChar < 10; thisChar++) {
  24. miPantallita.print(thisChar);
  25. delay(500);
  26. }
  27. // turn off automatic scrolling
  28. miPantallita.noAutoscroll();
  29.  
  30. // clear screen for the next loop:
  31. miPantallita.clear();
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement