int buttonState = 0; // Variable to store the current button state
int lastButtonState = 0; // Variable to store the previous button state
int ledState = LOW; // Variable to store the LED state (initially off)
// Initialize the LED pin as an output
// Initialize the push button pin as an input
// Read the current state of the push button
buttonState = digitalRead(2);
// Check if the button state has changed from the last loop
if (buttonState != lastButtonState)
// If the button state is HIGH (pressed)
// Update the LED pin with the new state
digitalWrite(13, ledState);