#include "Lcd.h"
const int RS = 12;
const int E = 11;
const int D4 = 10;
const int D5 = 9;
const int D6 = 8;
const int D7 = 7;
const unsigned long PAUSA = 0.1; // 20 ms
const char* FRASE = "ATENCION CUIDEN SUS PERTENENCIAS";/*TENGO UN DEFECTO EN LA NARIZ JOROñA QUE ES MUY MOLESTO QUE ME SUCEDE IGUAL EN VIGO QUE EN MADRID NO SE POR QUE CUANDO ME PONGO MUY NERVIOSO "
"ME DA UN PICOR IRRESISTIBLE EN LA NARIZ. SI EN EL COLEGIO HAY UN EXAMEN IMPORTANTE O POR LAS NOTAS ME REGANA MI PAPA ME DA ENSEGUIDA ESE PICOR TAN EXCITANTE "
"QUE POR DESGRACIA SIEMPRE ME HACE ESTORNUDAR AH AH ACHIS COMO ME PICA LA NARIZ COMO ME PICA LA NARIZ YA NO LO PUEDO RESISTIR COMO ME PICA LA NAR";*/
Lcd pantalla(RS,E,D4,D5,D6,D7,PAUSA);
void setup() {
Serial.begin(9600);
pinMode(RS, OUTPUT);
pinMode(E, OUTPUT);
pinMode(D4, OUTPUT);
pinMode(D5, OUTPUT);
pinMode(D6, OUTPUT);
pinMode(D7, OUTPUT);
digitalWrite(RS, LOW);
digitalWrite(E, LOW);
digitalWrite(D4, LOW);
digitalWrite(D5, LOW);
digitalWrite(D6, LOW);
digitalWrite(D7, LOW);
pantalla.inicia_pantalla();
}
void loop() {
int comptador = 0;
for (int index(0); index <= strlen(FRASE); ++index) {
if (index % 16 == 0) {
if (comptador % 2 == 0) {
pantalla.home();
} else {
pantalla.second();
}
comptador++;
delay(1000);
}
Serial.print(FRASE[index]);
pantalla.envia_dades_al_display(FRASE[index]);
}
pantalla.esborra_pantalla();
// pantalla.detencio_pantalla();
pantalla.home();
}