// Ponteras, John Apollo S.
// BSCPE 03-01-01
#define BUTTON 11
#define LED 13
void setup() {
// Pinmode Set
pinMode(11, INPUT_PULLUP);
pinMode(13, OUTPUT);
}
bool LED_STATE;
void loop() {
// Get the current state of the LED from the state of the button.
LED_STATE = digitalRead(BUTTON) == LOW ? HIGH : LOW;
// When the button is pressed the LED will be lit.
digitalWrite(LED, LED_STATE);
}
FINAL EXAM 2023 -SIR KIM