SHARE
TWEET

Untitled

a guest Feb 17th, 2020 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top