int led = 13;
int buttonPin = 8;
int buttonState ;
void setup() {
// put your setup code here, to run once:
pinMode(led,OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop() {
digitalWrite(buttonState,HIGH);
buttonState = digitalRead(buttonPin);
{
if (buttonState == LOW);
digitalWrite(led,HIGH);
}
else
digitalWrite(led,LOW);
}
}