/*Write a program to interface Button and LED, so that LED
blinks/glow when button is pressed.*/
const int led = 10;
const int buttonpin = 11;
void setup() {
// put your setup code here, to run once:
pinMode(buttonpin, INPUT);
pinMode(led, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int buttonstate = digitalRead(buttonpin);
if (buttonpin == HIGH) {
digitalWrite(led, HIGH);
}
else {
digitalWrite(led, LOW);
}
}