void setup() {
// put your setup code here, to run once:
pinMode(2, INPUT);
pinMode(6, INPUT);
for(int i=3; i<6; i++)
pinMode(i,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if(digitalRead(12)== HIGH)
{
for(int i=0; i<5; i++)
{
for(int j=3;j<6;j++)
digitalWrite(j, HIGH);
delay(500);
for(int k=3;k<6;k++)
digitalWrite(k, LOW);
delay(500);
}
}
//10 times
if(digitalRead(2)== HIGH)
{
for(int i=0; i<10; i++)
{
for(int j=3;j<6;j++)
digitalWrite(j, HIGH);
delay(500);
for(int k=3;k<6;k++)
digitalWrite(k, LOW);
delay(500);
}
}
}