more light in the fireflies example

main
benevpi 2021-01-20 12:09:31 +00:00
rodzic d039dde5d4
commit 14b23efac4
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -3,7 +3,7 @@ import ws2812b
import random
bright_div = 20
numpix = 30 # Number of NeoPixels
numpix = 50 # Number of NeoPixels
# Pin where NeoPixels are connected
strip = ws2812b.ws2812b(numpix, 0,0)
@ -12,7 +12,7 @@ colors = [
[200, 200, 20], # Yellow
[30, 200, 200], # Blue
[150,50,10],
[50,200,0],
[50,200,10],
]
max_len=20
@ -20,7 +20,7 @@ min_len = 5
#pixelnum, posn in flash, flash_len, direction
flashing = []
num_flashes = 5
num_flashes = 10
for i in range(num_flashes):
pix = random.randint(0, numpix - 1)
@ -49,6 +49,6 @@ while True:
flash_len = random.randint(min_len, max_len)
flashing[i] = [pix, colors[col], flash_len, 0, 1]
flashing[i][3] = flashing[i][3] + flashing[i][4]
time.sleep(0.007)
time.sleep(0.005)