2021-01-05 00:15:16 -03:00
|
|
|
/*
|
|
|
|
LiquidCrystal Library - display() and noDisplay()
|
|
|
|
|
|
|
|
Demonstrates the use a 16x2 LCD display.
|
|
|
|
|
|
|
|
This sketch uses the display() and noDisplay() functions
|
|
|
|
to turn on and off the display.
|
|
|
|
|
|
|
|
The circuit:
|
|
|
|
* LCD RS pin to digital pin 12
|
|
|
|
* LCD Enable pin to digital pin 11
|
|
|
|
* LCD D4 pin to digital pin 9
|
|
|
|
* LCD D5 pin to digital pin 8
|
|
|
|
* LCD D6 pin to digital pin 7
|
|
|
|
* LCD D7 pin to digital pin 6
|
|
|
|
* LCD R/W pin to ground
|
|
|
|
* 10K resistor:
|
|
|
|
* ends to +5V and ground
|
|
|
|
* wiper to LCD VO pin (pin 3)
|
|
|
|
*/
|
|
|
|
#include <LiquidCrystal.h>
|
|
|
|
|
|
|
|
// initialize the library with the numbers of the interface pins
|
|
|
|
LiquidCrystal lcd(12, 11, 9, 8, 7, 6);
|
|
|
|
byte fil;
|
|
|
|
byte col;
|
|
|
|
byte cont;
|
|
|
|
|
|
|
|
void setup() {
|
2022-04-04 17:41:38 -04:00
|
|
|
lcd.begin(16, 2);
|
|
|
|
fil = 0;
|
|
|
|
col = 0;
|
|
|
|
cont = 0;
|
2021-01-05 00:15:16 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
void loop() {
|
2022-04-04 17:41:38 -04:00
|
|
|
for (int i=0; i<8; i++) {
|
|
|
|
lcd.clear();
|
|
|
|
lcd.setCursor(col++ , fil);
|
|
|
|
lcd.print("FuzanToko");
|
|
|
|
lcd.noDisplay();
|
|
|
|
delay(100);
|
|
|
|
lcd.display();
|
|
|
|
delay(300);
|
|
|
|
}
|
|
|
|
fil += 1;
|
|
|
|
col = 7;
|
|
|
|
for (int j=0; j<8; j++) {
|
|
|
|
lcd.clear();
|
|
|
|
lcd.setCursor(col-- , fil);
|
|
|
|
lcd.print("FuzanToko");
|
|
|
|
lcd.noDisplay();
|
|
|
|
delay(100);
|
|
|
|
lcd.display();
|
|
|
|
delay(300);
|
|
|
|
}
|
|
|
|
setup();
|
2021-01-05 00:15:16 -03:00
|
|
|
}
|