const int lpin=13;
const int bpin=2;
void setup() {
pinMode(lpin, OUTPUT);
pinMode(bpin, INPUT_PULLUP);
// put your setup code here, to run once:
}
void loop() {
int digitalval=digitalRead(bpin);
if (digitalval==1)
{
digitalWrite(lpin, LOW);
}
else
{
digitalWrite(lpin, HIGH);
}
// put your main code here, to run repeatedly:
}