void setup() {
// put your setup code here, to run once:
pinMode(3, OUTPUT);
pinMode(2, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int statusButton = digitalRead(2);
if (statusButton == 0) {
digitalWrite(3, HIGH);
delay(500);
digitalWrite(3, LOW);
delay(500);
} else {
digitalWrite(3, HIGH);
delay(2000);
digitalWrite(3, LOW);
delay(2000);
}
}