diff options
| author | Scott Shawcroft <scott@chickadee.tech> | 2017-07-12 11:32:46 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@chickadee.tech> | 2017-07-12 11:55:17 -0700 |
| commit | 5e231bd8f9237dbecf3bd6835f0eaf85942a8f3b (patch) | |
| tree | 1785ac84a28d3908925f3866431d72cc5e070d73 | |
| parent | b6ebf855d33c4b825098a97b0dce6e1475d2f9f6 (diff) | |
shared-bindings: Add neopixel_write example. Fixes #163
| -rw-r--r-- | shared-bindings/neopixel_write/__init__.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/shared-bindings/neopixel_write/__init__.c b/shared-bindings/neopixel_write/__init__.c index faf2433d0..b0322b19c 100644 --- a/shared-bindings/neopixel_write/__init__.c +++ b/shared-bindings/neopixel_write/__init__.c @@ -41,6 +41,20 @@ //| The `neopixel_write` module contains a helper method to write out bytes in //| the 800khz neopixel protocol. //| +//| For example, to turn off a single neopixel (like the status pixel on Express +//| boards.) +//| +//| .. code-block:: python +//| +//| import board +//| import neopixel_write +//| import digitalio +//| +//| pin = digitalio.DigitalInOut(board.NEOPIXEL) +//| pin.direction = digitalio.Direction.output +//| pixel_off = bytearray([0, 0, 0]) +//| neopixel_write(pin, pixel_off) +//| //| .. method:: neopixel_write.neopixel_write(digitalinout, buf) //| //| Write buf out on the given DigitalInOut. |
