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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy