line 36 move outside for loop
the strip turns the pixel off before it fades out, so moving the strip outside the for loop lets the fade out happen, then turns the pixel off.
This commit is contained in:
parent
1e8fe9b8aa
commit
8ccfefa4c6
1 changed files with 1 additions and 2 deletions
|
|
@ -33,9 +33,8 @@ def flash_random(wait, howmany):
|
|||
|
||||
for i in range(5, 0, -1):
|
||||
strip.brightness = i / 5.0 # Ramp down brightness
|
||||
strip[j] = [0, 0, 0] # Set pixel to 'off'
|
||||
time.sleep(wait)
|
||||
|
||||
strip[j] = [0, 0, 0] # Set pixel to 'off'
|
||||
|
||||
while True:
|
||||
# first number is 'wait' delay, shorter num == shorter twinkle
|
||||
|
|
|
|||
Loading…
Reference in a new issue