neopixel_write.py
1 """ 2 `neopixel_write` - NeoPixel precision timed writing support 3 =========================================================== 4 5 See `CircuitPython:neopixel_write` in CircuitPython for more details. 6 Currently supported on Raspberry Pi only. 7 8 * Author(s): ladyada 9 """ 10 11 import sys 12 13 from adafruit_blinka.agnostic import detector 14 15 if detector.board.any_raspberry_pi: 16 from adafruit_blinka.microcontroller.bcm283x import neopixel as _neopixel 17 elif "sphinx" in sys.modules: 18 pass 19 else: 20 raise NotImplementedError("Board not supported") 21 22 23 def neopixel_write(gpio, buf): 24 """Write buf out on the given DigitalInOut.""" 25 return _neopixel.neopixel_write(gpio, buf)