void setup() {
// put your setup code here, to run once:
pinMode(13, OUTPUT);
}
void loop() {
int sos[] = {0,0,0,2,1,1,1,2,0,0,0}; // the individual flashes
int i; // defines i which will be used as the stopping point in the for loop
for (i = 0; i<9; i++) { // i is iterated on.
if (sos[i] == 0) { // if the position i in the sos array is 0, produces short
digitalWrite(13, HIGH);
delay(300);
digitalWrite(13, LOW);
delay(500);
}
else if (sos[i] == 1){ //if the position i in the sos array is 1, produces long
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(500);
}
else if (sos[i] == 2){
delay(500);
}
}
}