int led = 13;
int button = 2;
int bbutton = 4;
void setup() {
// put your setup code here, to run once:
pinMode(led, OUTPUT);
pinMode(button, INPUT_PULLUP);
pinMode(bbutton, INPUT_PULLUP);
}
void loop() {
static bool stateButton = false;
if(digitalRead(button) == LOW) stateButton =HIGH;
else if (digitalRead(bbutton)== LOW) stateButton = LOW;
// put your main code here, to run repeatedly:
if(stateButton == HIGH){
for (int x= 0; x<3 ; x++){
digitalWrite(led , HIGH);
delay(300);
digitalWrite(led, LOW);
delay(150);
}
delay(300);
for (int x; x<3 ; x++){
digitalWrite(led , HIGH);
delay(600);
digitalWrite(led, LOW);
delay(150);
}
delay(3000);
}
}