-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathledBoardController.py
148 lines (139 loc) · 5.99 KB
/
ledBoardController.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
from rpi_ws281x import *
from time import sleep
LED_COUNT = 64
LED_PIN = 18
LED_FREQ_HZ = 800000
LED_DMA = 10
LED_BRIGHTNESS = 5
LED_INVERT = False
LED_CHANNEL = 0
matrix = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS, LED_CHANNEL)
matrix.begin()
# MIC ON - NEON BLUE
def led_mic_on():
matrix.setPixelColor(50, Color(0, 255, 255))
matrix.setPixelColor(51, Color(0, 255, 255))
matrix.setPixelColor(41, Color(0, 255, 255))
matrix.setPixelColor(42, Color(0, 255, 255))
matrix.setPixelColor(43, Color(0, 255, 255))
matrix.setPixelColor(44, Color(0, 255, 255))
matrix.setPixelColor(45, Color(0, 255, 255))
matrix.setPixelColor(46, Color(0, 255, 255))
matrix.setPixelColor(39, Color(0, 255, 255))
matrix.setPixelColor(34, Color(0, 255, 255))
matrix.setPixelColor(33, Color(0, 255, 255))
matrix.setPixelColor(32, Color(0, 255, 255))
matrix.setPixelColor(29, Color(0, 255, 255))
matrix.setPixelColor(30, Color(0, 255, 255))
matrix.setPixelColor(31, Color(0, 255, 255))
matrix.setPixelColor(24, Color(0, 255, 255))
matrix.setPixelColor(17, Color(0, 255, 255))
matrix.setPixelColor(18, Color(0, 255, 255))
matrix.setPixelColor(19, Color(0, 255, 255))
matrix.setPixelColor(20, Color(0, 255, 255))
matrix.setPixelColor(21, Color(0, 255, 255))
matrix.setPixelColor(22, Color(0, 255, 255))
matrix.setPixelColor(13, Color(0, 255, 255))
matrix.setPixelColor(12, Color(0, 255, 255))
matrix.show()
# HEAD PHONES ON - LISTENING - YELLOW
def led_audio_on():
matrix.setPixelColor(63, Color(253, 254, 2))
matrix.setPixelColor(62, Color(253, 254, 2))
matrix.setPixelColor(61, Color(253, 254, 2))
matrix.setPixelColor(60, Color(253, 254, 2))
matrix.setPixelColor(59, Color(253, 254, 2))
matrix.setPixelColor(48, Color(253, 254, 2))
matrix.setPixelColor(53, Color(253, 254, 2))
matrix.setPixelColor(51, Color(253, 254, 2))
matrix.setPixelColor(50, Color(253, 254, 2))
matrix.setPixelColor(49, Color(253, 254, 2))
matrix.setPixelColor(44, Color(253, 254, 2))
matrix.setPixelColor(45, Color(253, 254, 2))
matrix.setPixelColor(46, Color(253, 254, 2))
matrix.setPixelColor(47, Color(253, 254, 2))
matrix.setPixelColor(41, Color(253, 254, 2))
matrix.setPixelColor(38, Color(253, 254, 2))
matrix.setPixelColor(25, Color(253, 254, 2))
matrix.setPixelColor(22, Color(253, 254, 2))
matrix.setPixelColor(16, Color(253, 254, 2))
matrix.setPixelColor(17, Color(253, 254, 2))
matrix.setPixelColor(18, Color(253, 254, 2))
matrix.setPixelColor(19, Color(253, 254, 2))
matrix.setPixelColor(15, Color(253, 254, 2))
matrix.setPixelColor(14, Color(253, 254, 2))
matrix.setPixelColor(13, Color(253, 254, 2))
matrix.setPixelColor(12, Color(253, 254, 2))
matrix.setPixelColor(10, Color(253, 254, 2))
matrix.setPixelColor(4, Color(253, 254, 2))
matrix.setPixelColor(3, Color(253, 254, 2))
matrix.setPixelColor(2, Color(253, 254, 2))
matrix.setPixelColor(1, Color(253, 254, 2))
matrix.setPixelColor(0, Color(253, 254, 2))
matrix.show()
#VIDEO ON - NEON PURPLE
def led_video_on():
matrix.setPixelColor(56, Color(199, 36, 177))
matrix.setPixelColor(57, Color(199, 36, 177))
matrix.setPixelColor(58, Color(199, 36, 177))
matrix.setPixelColor(59, Color(199, 36, 177))
matrix.setPixelColor(60, Color(199, 36, 177))
matrix.setPixelColor(61, Color(199, 36, 177))
matrix.setPixelColor(62, Color(199, 36, 177))
matrix.setPixelColor(63, Color(199, 36, 177))
matrix.setPixelColor(55, Color(199, 36, 177))
matrix.setPixelColor(48, Color(199, 36, 177))
matrix.setPixelColor(40, Color(199, 36, 177))
matrix.setPixelColor(47, Color(199, 36, 177))
matrix.setPixelColor(39, Color(199, 36, 177))
matrix.setPixelColor(32, Color(199, 36, 177))
matrix.setPixelColor(25, Color(199, 36, 177))
matrix.setPixelColor(26, Color(199, 36, 177))
matrix.setPixelColor(27, Color(199, 36, 177))
matrix.setPixelColor(28, Color(199, 36, 177))
matrix.setPixelColor(29, Color(199, 36, 177))
matrix.setPixelColor(30, Color(199, 36, 177))
matrix.setPixelColor(21, Color(199, 36, 177))
matrix.setPixelColor(18, Color(199, 36, 177))
matrix.setPixelColor(9, Color(199, 36, 177))
matrix.setPixelColor(14, Color(199, 36, 177))
matrix.setPixelColor(7, Color(199, 36, 177))
matrix.setPixelColor(6, Color(199, 36, 177))
matrix.setPixelColor(5, Color(199, 36, 177))
matrix.setPixelColor(4, Color(199, 36, 177))
matrix.setPixelColor(3, Color(199, 36, 177))
matrix.setPixelColor(2, Color(199, 36, 177))
matrix.setPixelColor(1, Color(199, 36, 177))
matrix.setPixelColor(0, Color(199, 36, 177))
matrix.show()
#DND - RED
def led_dnd():
matrix.setPixelColor(58, Color(254, 0, 0))
matrix.setPixelColor(59, Color(254, 0, 0))
matrix.setPixelColor(60, Color(254, 0, 0))
matrix.setPixelColor(61, Color(254, 0, 0))
matrix.setPixelColor(54, Color(254, 0, 0))
matrix.setPixelColor(49, Color(254, 0, 0))
matrix.setPixelColor(40, Color(254, 0, 0))
matrix.setPixelColor(42, Color(254, 0, 0))
matrix.setPixelColor(47, Color(254, 0, 0))
matrix.setPixelColor(39, Color(254, 0, 0))
matrix.setPixelColor(36, Color(254, 0, 0))
matrix.setPixelColor(32, Color(254, 0, 0))
matrix.setPixelColor(24, Color(254, 0, 0))
matrix.setPixelColor(28, Color(254, 0, 0))
matrix.setPixelColor(31, Color(254, 0, 0))
matrix.setPixelColor(23, Color(254, 0, 0))
matrix.setPixelColor(18, Color(254, 0, 0))
matrix.setPixelColor(16, Color(254, 0, 0))
matrix.setPixelColor(9, Color(254, 0, 0))
matrix.setPixelColor(14, Color(254, 0, 0))
matrix.setPixelColor(5, Color(254, 0, 0))
matrix.setPixelColor(4, Color(254, 0, 0))
matrix.setPixelColor(3, Color(254, 0, 0))
matrix.setPixelColor(2, Color(254, 0, 0))
matrix.show()
def led_off():
for x in range(0, LED_COUNT):
matrix.setPixelColor(x, Color(0, 0, 0))
matrix.show()