Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <LiquidCrystal.h>
- LiquidCrystal miPantallita(12, 13, 5, 4, 3, 2);
- void setup() {
- // set up the LCD's number of columns and rows:
- miPantallita.begin(16, 2);
- }
- void loop() {
- // set the cursor to (0,0):
- miPantallita.setCursor(0, 0);
- // print from 0 to 9:
- for (int thisChar = 0; thisChar < 10; thisChar++) {
- miPantallita.print(thisChar);
- delay(500);
- }
- // set the cursor to (16,1):
- miPantallita.setCursor(16, 1);
- // set the display to automatically scroll:
- miPantallita.autoscroll();
- // print from 0 to 9:
- for (int thisChar = 0; thisChar < 10; thisChar++) {
- miPantallita.print(thisChar);
- delay(500);
- }
- // turn off automatic scrolling
- miPantallita.noAutoscroll();
- // clear screen for the next loop:
- miPantallita.clear();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement