const int Green_LED = 8;
const int Green_BUTTON = 7;
int BUTTON_VALUE;
void setup() {
//put your setup code here, to run once:
pinMode(Green_LED, OUTPUT);
pinMode(Green_BUTTON, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
BUTTON_VALUE=digitalRead(Green_BUTTON);
if (BUTTON_VALUE == LOW){
digitalWrite(Green_LED, LOW);
delay(500);
}else{
digitalWrite(Green_LED, HIGH);
delay(500);
}
}