int BP=9,LED=11;
void setup() {
pinMode(LED,OUTPUT);
pinMode(BP, INPUT_PULLUP);
}
void loop() {
if(digitalRead(BP)==LOW)
{
digitalWrite (LED,HIGH);
}
else
{
digitalWrite (LED,LOW);
}
}
int BP=9,LED=11;
void setup() {
pinMode(LED,OUTPUT);
pinMode(BP, INPUT_PULLUP);
}
void loop() {
if(digitalRead(BP)==LOW)
{
digitalWrite (LED,HIGH);
}
else
{
digitalWrite (LED,LOW);
}
}