void setup() {
pinMode(2, INPUT); // Set pin 2 as input for the push button
pinMode(9, OUTPUT); // Set pin 9 as output for the red LED
}
void loop() {
if(digitalRead(2) == HIGH) { // If the push button reading is HIGH
digitalWrite(9, HIGH); // Turn on the red LED
}
else {
digitalWrite(9, LOW); // Turn off the red LED
}
}