-
Notifications
You must be signed in to change notification settings - Fork 0
/
concert-led.py
executable file
·90 lines (70 loc) · 1.17 KB
/
concert-led.py
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/python
import led_functions as lf
import time
red = 18
yellow = 23
green = 24
blue = 25
white = 4
lf.setup(red)
lf.setup(yellow)
lf.setup(green)
lf.setup(blue)
lf.setup(white)
lf.turn_on(red)
time.sleep(0.5)
lf.turn_off(red)
lf.turn_on(yellow)
time.sleep(0.5)
lf.turn_off(yellow)
lf.turn_on(green)
time.sleep(0.5)
lf.turn_off(green)
lf.turn_on(blue)
time.sleep(0.5)
lf.turn_off(blue)
lf.turn_on(white)
time.sleep(0.5)
lf.turn_on(red)
lf.turn_on(green)
time.sleep(0.5)
lf.turn_off(green)
lf.turn_on(yellow)
time.sleep(0.1)
lf.turn_off(yellow)
lf.turn_on(green)
time.sleep(0.1)
lf.turn_off(green)
lf.turn_on(blue)
time.sleep(0.1)
lf.turn_off(blue)
lf.turn_off(white)
lf.turn_off(red)
time.sleep(0.1)
lf.turn_on(red)
lf.turn_on(green)
lf.turn_on(white)
time.sleep(0.5)
lf.turn_off(red)
lf.turn_off(green)
lf.turn_off(white)
time.sleep(0.5)
lf.turn_on(yellow)
lf.turn_on(blue)
time.sleep(0.25)
lf.turn_off(yellow)
lf.turn_off(blue)
time.sleep(0.5)
lf.turn_on(yellow)
lf.turn_on(blue)
time.sleep(0.25)
lf.turn_off(yellow)
lf.turn_off(blue)
time.sleep(0.5)
lf.turn_on(red)
lf.turn_on(green)
lf.turn_on(white)
time.sleep(1)
lf.turn_off(red)
lf.turn_off(green)
lf.turn_off(white)