Skip to content

Commit 7c39618

Browse files
committed
Add brightness variable.
1 parent e505b2d commit 7c39618

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

PyPortal_NeoPixel_Color_Picker/PyPortal_NeoPixel_Color_Picker.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
# Set the background color
99
BACKGROUND_COLOR = 0x443355
1010

11+
# Set the NeoPixel brightness
12+
BRIGHTNESS = 0.3
13+
1114
light_sensor = analogio.AnalogIn(board.LIGHT)
1215

13-
strip_1 = neopixel.NeoPixel(board.D4, 30, brightness=0.3)
14-
strip_2 = neopixel.NeoPixel(board.D3, 30, brightness=0.3)
16+
strip_1 = neopixel.NeoPixel(board.D4, 30, brightness=BRIGHTNESS)
17+
strip_2 = neopixel.NeoPixel(board.D3, 30, brightness=BRIGHTNESS)
1518

1619
# Turn off NeoPixels to start
1720
strip_1.fill(0)

0 commit comments

Comments
 (0)