10000 shared-bindings: Add neopixel_write example. Fixes #163 · sparkfun/circuitpython@a91592d · GitHub
[go: up one dir, main page]

Skip to content

Commit a91592d

Browse files
committed
shared-bindings: Add neopixel_write example. Fixes adafruit#163
1 parent 5d732f4 commit a91592d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

shared-bindings/neopixel_write/__init__.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@
4141
//| The `neopixel_write` module contains a helper method to write out bytes in
4242
//| the 800khz neopixel protocol.
4343
//|
44+
//| For example, to turn off a single neopixel (like the status pixel on Express
45+
//| boards.)
46+
//|
47+
//| .. code-block:: python
48+
//|
49+
//| import board
50+
//| import neopixel_write
51+
//| import digitalio
52+
//|
53+
//| pin = digitalio.DigitalInOut(board.NEOPIXEL)
54+
//| pin.direction = digitalio.Direction.output
55+
//| pixel_off = bytearray([0, 0, 0])
56+
//| neopixel_write(pin, pixel_off)
57+
//|
4458
//| .. method:: neopixel_write.neopixel_write(digitalinout, buf)
4559
//|
4660
//| Write buf out on the given DigitalInOut.

0 commit comments

Comments
 (0)
0