I have a project where I want to loop a flash 400 times then carry on how would I do this?
here is the code so far;
int pin13 = 13;
int pin12 = 12;
void setup()
{
pinMode(pin13, OUTPUT);
pinMode(pin12, OUTPUT);
}
void loop()
{
day(); eve(); night(); eve();
}
void night()
{
digitalWrite(pin12, HIGH);
delay(240000);
}
void day()
{
digitalWrite(pin13, HIGH);
delay(420000);
}
void eve()
{
digitalWrite(pin13, HIGH);
delay(112.5);
digitalWrite(pin13, LOW);
digitalWrite(pin12, HIGH);
delay(112.5);
digitalWrite(pin12, LOW);
digitalWrite(pin13, HIGH);
delay(112.5);
digitalWrite(pin13, LOW);
digitalWrite(pin12, HIGH);
delay(112.5);
digitalWrite(pin12, LOW);
digitalWrite(pin13, HIGH);
delay(112.5);
I want to loop the eve part
digitalWrite(pin13, HIGH);
delay(112.5);
digitalWrite(pin13, LOW);
digitalWrite(pin12, HIGH);
delay(112.5);
digitalWrite(pin12, LOW);
I want to loop this 400 times rather than having it all written out 400 times like I have It currently