const int ledPin = 13; const int buttonPin = 2; int button = 0; void setup(){ pinMode(ledPin, OUTPUT); pinMode(buttonPin, INPUT_PULLUP); } void loop() { int buttonState = digitalRead(buttonPin); if (buttonState == HIGH){ digitalWrite(ledPin, LOW); } else { digitalWrite(ledPin, HIGH); } }