int RedledPin= 2;
int BlueledPin= 4;
int buttonPin= 8;
void setup() { // meant for configuration and initialisation
//put your setup code here, to run once:
pinMode(RedledPin, OUTPUT);
pinMode(BlueledPin, OUTPUT);
pinMode(buttonPin, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int buttonValue = digitalRead(buttonPin);
if(buttonValue == HIGH){
for(int i =0; i<4; i++)
{
digitalWrite(RedledPin, HIGH);
delay(200);
digitalWrite(RedledPin, LOW);
delay(200);
digitalWrite(BlueledPin, HIGH);
delay(200);
digitalWrite(BlueledPin, LOW);
delay(200);
}
}
}