/
LEA4_SOS.ino
48 lines (45 loc) · 1.42 KB
/
LEA4_SOS.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
void setup() {
// put your setup code here, to run once:
pinMode(13, OUTPUT);
}
void loop() {
// 3 short flashes
digitalWrite(13, HIGH);//turn the LED on(HIGH is the voltage level)
delay(500); //wait for a half second
digitalWrite(13, LOW); //turn the LED off by making the voltage LOW
delay(300); //pause for 300 milliseconds, about 1/3 of a second
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(300);
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(300);
//three long flashes
digitalWrite(13, HIGH); //turn the LED on
delay(1500); //wait for a second and a half
digitalWrite(13, LOW); //turn the LED off by making the voltage LOW
delay(300);
digitalWrite(13, HIGH);
delay(1500);
digitalWrite(13, LOW);
delay(300);
digitalWrite(13, HIGH);
delay(1500);
digitalWrite(13, LOW);
delay(300);
// 3 short flashes again
digitalWrite(13, HIGH); //turn the LED on
delay(500); //wait for a half second
digitalWrite(13, LOW); //turn the LED off by making the voltage LOW
delay(300);
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(300);
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(3000); //final delay is 3 seconds
}