neopixel_write
– Low-level neopixel implementation¶
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.)
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.neopixel_write(pin, pixel_off)
Available on these boards
- neopixel_write.neopixel_write(digitalinout: digitalio.DigitalInOut, buf: _typing.ReadableBuffer) None ¶
Write buf out on the given DigitalInOut.
- Paramètres:
digitalinout (DigitalInOut) – the DigitalInOut to output with
buf (ReadableBuffer) – The bytes to clock out. No assumption is made about color order