and here is my code:
int LED = 13;
int BTN = 7;
void setup() {
pinMode(LED,OUTPUT);
pinMode(BTN,INPUT);
}
void loop() {
if(digitalRead(BTN) == HIGH) {
digitalWrite(LED,LOW);
}
else{
digitalWrite(LED,HIGH);
}
}
When I press the button, the LED is supposed to go low, but it doesn't. What is wrong with this circuit/code?