void setup() {
pinMode(1, INPUT_PULLUP); // Set PB1 (Pin 1) as input with internal pull-up resistor
pinMode(2, OUTPUT); // Set PB2 (Pin 2) as output
}
void loop() {
if (digitalRead(1) == LOW) { // Check if the button (connected to PB1) is pressed
digitalWrite(2, HIGH); // Turn on LED (connected to PB2)
} else {
digitalWrite(2, LOW); // Turn off LED
}
}