File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed
status_led_one_dotstar_rainbow
status_led_one_neopixel_rainbow Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 11# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
22# SPDX-License-Identifier: Unlicense
33"""
4- CircuitPython DotStar rainbow , brightness control example.
4+ CircuitPython DotStar red, green, blue , brightness control example.
55"""
66import time
77import board
1414
1515def rainbow (delay ):
1616 for color_value in range (255 ):
17- for led in range (1 ):
18- dot_index = (led * 256 // 1 ) + color_value
19- dot [led ] = colorwheel (dot_index & 255 )
20- dot .show ()
17+ dot [0 ] = colorwheel (color_value )
2118 time .sleep (delay )
2219
2320
Original file line number Diff line number Diff line change 66from rainbowio import colorwheel
77import neopixel
88
9- pixel = neopixel .NeoPixel (board .NEOPIXEL , 1 , auto_write = False )
10-
9+ pixel = neopixel .NeoPixel (board .NEOPIXEL , 1 )
1110pixel .brightness = 0.3
1211
1312
1413def rainbow (delay ):
1514 for color_value in range (255 ):
16- for led in range (1 ):
17- pixel_index = (led * 256 // 1 ) + color_value
18- pixel [led ] = colorwheel (pixel_index & 255 )
19- pixel .show ()
15+ pixel [0 ] = colorwheel (color_value )
2016 time .sleep (delay )
2117
2218
You can’t perform that action at this time.
0 commit comments