void setup() {
pinMode(13, OUTPUT); // declare pin 13 (BLUE LED) as output
pinMode(7, OUTPUT); // declare pin 7 (yellow LED) as output
pinMode(12, INPUT); // NIGHT BUTTON
pinMode(6, INPUT); // DAY BUTTON
}
void loop() {
if (digitalRead(12) == HIGH) { //if the NIGHT button is pressed:
digitalWrite(13, HIGH); // turn the blue LED on pin 3 ON
digitalWrite(7, LOW); // turn the yellow LED on pin 3 OFF
}
else if (digitalRead(6) == HIGH) { //if the DAY button is pressed:
digitalWrite(13, LOW); // turn the blue LED on pin 3 OFF
digitalWrite(7, HIGH); // turn the yellow LED on pin 3 ON
}
}