From 30cbcf881daeecbc100554879e8a92d71185d9f6 Mon Sep 17 00:00:00 2001 From: Mike Causer Date: Fri, 30 Apr 2021 14:24:44 +1000 Subject: [PATCH] docs/esp32: Add APA106 to quickref. --- docs/esp32/quickref.rst | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/esp32/quickref.rst b/docs/esp32/quickref.rst index a569ff0a4e28..68938feedce0 100644 --- a/docs/esp32/quickref.rst +++ b/docs/esp32/quickref.rst @@ -483,10 +483,10 @@ Be sure to put a 4.7k pull-up resistor on the data line. Note that the ``convert_temp()`` method must be called each time you want to sample the temperature. -NeoPixel driver ---------------- +NeoPixel and APA106 driver +-------------------------- -Use the ``neopixel`` module:: +Use the ``neopixel`` and ``apa106`` modules:: from machine import Pin from neopixel import NeoPixel @@ -497,6 +497,13 @@ Use the ``neopixel`` module:: np.write() # write data to all pixels r, g, b = np[0] # get first pixel colour + +The APA106 driver extends NeoPixel, but internally uses a different colour order:: + + from apa106 import APA106 + ap = APA106(pin, 8) + r, g, b = ap[0] + For low-level driving of a NeoPixel:: import esp @@ -508,6 +515,7 @@ For low-level driving of a NeoPixel:: 400kHz) devices by passing ``timing=0`` when constructing the ``NeoPixel`` object. +APA102 (DotStar) uses a different driver as it has an additional clock pin. Capacitive touch ----------------