void setup() {
pinMode(5, INPUT_PULLUP);
lcd.begin(16, 2)
lcd.print("Clase MicroControladores");
}
void loop() {
sw = digitalRead(5);
lcd.setCursor(0,1);
lcd.print("Segundos");
lcd.print(millis()/1000);
lcd.display();
if (sw == 0){
lcd.clear();
lcd.print("Interruptor off");
delay(1000);
lcd.noDisplay();
}
else {
lcd.display();
lcd.clear();
lcd.setCursor(0, 1);
lcd.print("Interruptor on");
delay(1000);
}
}