#define LED_PIN 23
#define BUTTON_PIN 26
void setup() {
pinMode(LED_PIN, OUTPUT); // Set the LED pin as output
pinMode(BUTTON_PIN, INPUT_PULLUP); // Set the button pin as input with pull-up resistor
}
void loop() {
int buttonState = digitalRead(BUTTON_PIN); // Read button state
if (buttonState == LOW) { // If button is pressed
digitalWrite(LED_PIN, HIGH); // Turn on LED
} else {
digitalWrite(LED_PIN, LOW); // Turn off LED
}
}