Skip to content

Commit 8ccfefa

Browse files
authored
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.
1 parent 1e8fe9b commit 8ccfefa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Gemma_Nano_Ring/code.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ def flash_random(wait, howmany):
3333

3434
for i in range(5, 0, -1):
3535
strip.brightness = i / 5.0 # Ramp down brightness
36-
strip[j] = [0, 0, 0] # Set pixel to 'off'
3736
time.sleep(wait)
38-
37+
strip[j] = [0, 0, 0] # Set pixel to 'off'
3938

4039
while True:
4140
# first number is 'wait' delay, shorter num == shorter twinkle

0 commit comments

Comments
 (0)