Update heart.py
This commit is contained in:
parent
537db91acc
commit
d709a545d7
32
heart.py
32
heart.py
|
@ -3,11 +3,31 @@ import time
|
||||||
|
|
||||||
ws = WS2812B(256, 28, 0.2)
|
ws = WS2812B(256, 28, 0.2)
|
||||||
|
|
||||||
array = [[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
array = [
|
||||||
[ws.BLACK, ws.BLACK, ws.BLACK, ws.BLACK],
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
[ws.BLACK, ws.BLACK, ws.BLACK, ws.BLACK],
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
[ws.BLACK, ws.BLACK, ws.BLACK, ws.BLACK]]
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
[ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK, ws.RED, ws.BLACK, ws.BLACK, ws.BLACK],
|
||||||
|
]
|
||||||
|
|
||||||
for i in range(4):
|
for i in range(16):
|
||||||
ws.pixels_set(i, array[i][0])
|
if i % 2 == 1:
|
||||||
|
array[i] = array[i][::-1]
|
||||||
|
|
||||||
|
array = [elem for row in array for elem in row]
|
||||||
|
|
||||||
|
for i in range(256):
|
||||||
|
ws.pixels_set(i, array[i])
|
||||||
ws.pixels_show()
|
ws.pixels_show()
|
Loading…
Reference in New Issue