-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvisage.py
41 lines (36 loc) · 825 Bytes
/
visage.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
from sense_hat import SenseHat
from time import sleep
sense = SenseHat()
O = (0, 255, 0) # Green
X = (0, 0, 0) # Black
B = (102, 51, 0)#Brown
b = (0, 0, 255)#Blue
S = (205,133,63)#Beige
W = (255, 255, 255)#White
R = (255, 0, 0)#Red
creeper = [
O, O, O, O, O, O, O, O,
O, O, O, O, O, O, O, O,
O, X, X, O, O, X, X, O,
O, X, X, O, O, X, X, O,
O, O, O, X, X, O, O, O,
O, O, X, X, X, X, O, O,
O, O, X, X, X, X, O, O,
O, O, X, O, O, X, O, O
]
steve = [
B, B, B, B, B, B, B, B,
B, B, B, B, B, B, B, B,
B, S, S, S, S, S, S, B,
S, S, S, S, S, S, S, S,
S, W, b, S, S, b, W, S,
S, S, S, B, B, S, S, S,
S, S, B, S, S, B, S, S,
S, S, B, B, B, B, S, S
]
def visage():
sense.set_pixels(creeper)
sleep(5)
sense.set_pixels(steve)
sleep(5)
sense.clear()