We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c993b31 commit d76cff9Copy full SHA for d76cff9
2 files changed
QT_Py_RP2040/digital_input_neopixel.py …Py_RP2040/digital_input_neopixel/code.pyQT_Py_RP2040/digital_input_neopixel.py renamed to QT_Py_RP2040/digital_input_neopixel/code.py
QT_Py_RP2040/neopixel_rainbow/code.py
@@ -0,0 +1,22 @@
1
+"""CircuitPython NeoPixel rainbow example for QT Py RP2040"""
2
+import time
3
+import board
4
+import neopixel
5
+from _pixelbuf import colorwheel
6
+
7
+pixel = neopixel.NeoPixel(board.NEOPIXEL, 1, auto_write=False)
8
9
+pixel.brightness = 0.3
10
11
12
+def rainbow(delay):
13
+ for color_value in range(255):
14
+ for led in range(1):
15
+ pixel_index = (led * 256 // 1) + color_value
16
+ pixel[led] = colorwheel(pixel_index & 255)
17
+ pixel.show()
18
+ time.sleep(delay)
19
20
21
+while True:
22
+ rainbow(0.02)
0 commit comments