-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathsos1.ino
More file actions
33 lines (25 loc) · 722 Bytes
/
Copy pathsos1.ino
File metadata and controls
33 lines (25 loc) · 722 Bytes
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
#include <Automaton.h>
Atm_led led;
const int pin = 4;
const int dotTime = 100;
const int dashTime = 300;
const int waitTime = 200;
const int longwaitTime = 500;
const int longerwaitTime = 1000;
void setup() {
led.begin( pin );
}
void loop() {
// Set the led to blink 3 times and trigger it
led.blink( dotTime, waitTime, 3 ).start();
// Loop until the blinking has finished
while ( led.cycle().state() );
// Cycle idly for a while
led.cycle( longwaitTime );
led.blink( dashTime, waitTime, 3 ).start();
while ( led.cycle().state() );
led.cycle( longwaitTime );
led.blink( dotTime, waitTime, 3 ).start();
while ( led.cycle().state() );
led.cycle( longerwaitTime );
}