//Coded By: Nitin Rajput
const int ledpin = 8;
const int buttonpin = 2;
int buttonState = 0;
void setup() {
pinMode(buttonpin, INPUT);
pinMode(ledpin, OUTPUT);
}
void loop() {
buttonState = digitalRead(buttonpin);
if (buttonState == HIGH)
{
digitalWrite(ledpin, HIGH);
}
else
{
digitalWrite(ledpin, LOW);
}
}