-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuhhelpertest.py
More file actions
35 lines (32 loc) · 1.58 KB
/
uhhelpertest.py
File metadata and controls
35 lines (32 loc) · 1.58 KB
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
import unicornhathelper as ledHelper
import time
myMatrix = [ [ [0, 0, 255], [0, 0, 255], [0, 0, 255], [0, 0, 255], [0, 0, 255], [0, 0, 255], [0, 0, 255], [0, 0, 255] ],
[ [0, 0, 255], [255, 0, 0], [255, 0, 0], [0, 0, 255], [0, 0, 255], [255, 0, 0], [255, 0, 0], [0, 0, 255] ],
[ [255, 0, 0], [0, 255, 0], [0, 255, 0], [255, 0, 0], [255, 0, 0], [0, 255, 0], [0, 255, 0], [255, 0, 0] ],
[ [255, 0, 0], [0, 255, 0], [0, 255, 0], [0, 255, 0], [0, 255, 0], [0, 255, 0], [0, 255, 0], [255, 0, 0] ],
[ [255, 0, 0], [0, 255, 0], [0, 255, 0], [0, 255, 0], [0, 255, 0], [0, 255, 0], [0, 255, 0], [255, 0, 0] ],
[ [0, 0, 255], [255, 0, 0], [0, 255, 0], [0, 255, 0], [0, 255, 0], [0, 255, 0], [255, 0, 0], [0, 0, 255] ],
[ [0, 0, 255], [0, 0, 255], [255, 0, 0], [0, 255, 0], [0, 255, 0], [255, 0, 0], [0, 0, 255], [0, 0, 255] ],
[ [0, 0, 255], [0, 0, 255], [0, 0, 255], [255, 0, 0], [255, 0, 0], [0, 0, 255], [0, 0, 255], [0, 0, 255] ]
]
ledHelper.applyTransform(myMatrix, "test1", 0.2)
time.sleep(3)
ledHelper.clearLEDs()
ledHelper.applyTransform(myMatrix, "test2", 0.2)
time.sleep(3)
ledHelper.clearLEDs()
ledHelper.applyTransform(myMatrix, "test3", 0.2)
time.sleep(3)
ledHelper.clearLEDs()
ledHelper.applyTransform(myMatrix, "test4", 0.2)
time.sleep(3)
ledHelper.clearLEDs()
ledHelper.applyTransform(myMatrix, "test5", 0.2)
time.sleep(3)
ledHelper.clearLEDs()
ledHelper.applyTransform(myMatrix, "test6", 0.2)
time.sleep(3)
ledHelper.clearLEDs()
ledHelper.applyTransform(myMatrix, "test7", 0.2)
while True:
time.sleep(1)