kopia lustrzana https://github.com/blaz-r/pico_python_ws2812b
getting rid of absolute numbers
rodzic
226330d7b1
commit
497dda7cf5
|
@ -5,8 +5,8 @@ num_leds = 30
|
||||||
pixels = ws2812b(num_leds, 0,0)
|
pixels = ws2812b(num_leds, 0,0)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
for i in range(30):
|
for i in range(num_leds):
|
||||||
for j in range(30):
|
for j in range(num_leds):
|
||||||
pixels.set_pixel(j,abs(i+j)%10,abs(i-(j+3))%10,abs(i-(j+6))%10)
|
pixels.set_pixel(j,abs(i+j)%10,abs(i-(j+3))%10,abs(i-(j+6))%10)
|
||||||
pixels.show()
|
pixels.show()
|
||||||
time.sleep(0.05)
|
time.sleep(0.05)
|
||||||
|
|
Ładowanie…
Reference in New Issue