int buttonPin = 2;
int ledPin = 3;
int ledpin = 4;
void setup() {
pinMode(buttonPin, INPUT_PULLUP);
pinMode(ledPin, OUTPUT);
pinMode (ledpin, OUTPUT );
}
void loop() {
int buttonState = digitalRead(buttonPin);
if (buttonState == LOW) {
digitalWrite(ledPin, HIGH);
digitalWrite (ledpin, LOW );
} else {
digitalWrite(ledPin, LOW);
digitalWrite (ledpin, HIGH );
}
}