/* Application: LED - Button Author: Guadalupe Nieves Choque Choque */ #define pinLed 2 #define pinButton 3 void setup() { pinMode(pinLed, OUTPUT); pinMode(pinButton, INPUT); } void loop() { if (digitalRead(pinButton)){ digitalWrite(pinLed, HIGH); } else{ digitalWrite(pinLed, LOW); } }