int LedPin = 7;
int button = 2;
bool n = false;
void setup() {
// put your setup code here, to run once:
pinMode(button, INPUT);
pinMode(LedPin, OUTPUT);
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
int buttonState = digitalRead(button);
Serial.println(buttonState);
if (buttonState == HIGH) digitalWrite(LedPin, HIGH);
else digitalWrite(LedPin, LOW);
}