Skip to content

Commit

Permalink
docs/esp32: Add APA106 to quickref.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcauser authored and dpgeorge committed May 14, 2021
1 parent 94a3f8a commit 30cbcf8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions docs/esp32/quickref.rst
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
----------------
Expand Down

0 comments on commit 30cbcf8

Please sign in to comment.