#include <LiquidCrystal_I2C.h>
#define I2C_ADDR 0x27
#define LCD_COLUMNS 20
#define LCD_LINES 4
#define slide_switch 10
/* declarar caracter */
byte dragon[8]={B01110,B01101,B01111,B01110,B01110,B11110,B01110,B01010};
byte arrow [8]={B00011,B00111,B01111,B11111,B01111,B00111,B00011,B00001};
LiquidCrystal_I2C lcd(I2C_ADDR, LCD_COLUMNS, LCD_LINES);
int tempo5 = 500;
int tempo1 = 1000;
int tempo2 = 2000;
int tempo3 = 3000;
void setup() {
Serial.begin(9600);
lcd.init();
lcd.backlight();
/*lcd.setCursor(1, 0);
lcd.print("CORES");*/
pinMode(slide_switch, OUTPUT);
digitalWrite(slide_switch, HIGH);
/* colocando caracter */
lcd.createChar(0,dragon);
lcd.createChar(1,arrow);
delay(tempo3);
lcd.clear();
}
void loop() {
caracter();
/*vermelho();*/
}
/*void vermelho() {
lcd.setCursor(1, 1);
lcd.print("Vermelho");
delay(tempo2);
lcd.clear();
}*/
void caracter() {
for (int y=0; y<4; y++){
for (int x=0; x<19; x++){
lcd.setCursor(x,y);
lcd.write(0);
delay(100);
lcd.clear();
}
}
for (int y=3; y>=0; y--){
for (int x=20; x>=0; x--){
lcd.setCursor(x,y);
lcd.write(1);
delay(100);
lcd.clear();
}
}
}