File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ """
2
+ CircuitPython NeoPixel Blink example - blinking the built-in NeoPixel(s).
3
+
4
+ Update NUMBER_OF_PIXELS to the match the number of built-in NeoPixels on the board.
5
+
6
+ DO NOT INCLUDE THE pylint: disable LINE IN THE GUIDE CODE. It is present only to deal with the
7
+ NUMBER_OF_PIXELS variable being undefined in this pseudo-code. As you will be updating the variable
8
+ in the guide, you will not need the pylint: disable.
9
+
10
+ For example:
11
+ If you are using a QT Py, change NUMBER_OF_PIXELS to 1.
12
+ If using a Neo Trinkey, change NUMBER_OF_PIXELS to 4.
13
+ """
14
+ # pylint: disable=undefined-variable
15
+
16
+ import time
17
+ import board
18
+ import neopixel
19
+
20
+ pixel = neopixel .NeoPixel (board .NEOPIXEL , NUMBER_OF_PIXELS )
21
+
22
+ while True :
23
+ pixel .fill ((255 , 0 , 0 ))
24
+ time .sleep (0.5 )
25
+ pixel .fill ((0 , 0 , 0 ))
26
+ time .sleep (0.5 )
You can’t perform that action at this time.
0 commit comments