shared-bindings: Add neopixel_write example. Fixes #163

This commit is contained in:
Scott Shawcroft 2017-07-12 11:32:46 -07:00
parent b6ebf855d3
commit 5e231bd8f9
1 changed files with 14 additions and 0 deletions

View File

@ -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.