int buttonPin = 2;
int LEDPin = 13;
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
bool buttonPressed = digitalRead(buttonPin);
if (buttonPressed) {
digitalWrite(LEDPin, HIGH);
} else
digitalWrite(LEDPin, LOW);
}