Skip to content
15 changes: 9 additions & 6 deletions docs/neopixel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ need to import it separately with::

.. note::

From our tests, the micro:bit NeoPixel module can drive up to around 256
From our tests, the Microbit NeoPixel module can drive up to around 256
NeoPixels. Anything above that and you may experience weird bugs and
issues. The micro:bit can only supply 90mA **V1** or 190mA **V2** to
external devices, larger numbers of NeoPixels require an external power
external devices,larger numbers of NeoPixels require an external power
supply with common ground.

NeoPixels are designed to work at 5V, but luckily they still function using
Expand All @@ -27,6 +27,8 @@ contains everything to plug them into a micro:bit and create funky displays,
art and games such as the demo shown below.

.. image:: neopixel.gif
:alt: Neopixel flexible tile
Image attribution: `adafruit flexible Neopixel matrix <https://www.adafruit.com/product/2547>`_

To connect a strip of neopixels you'll need to attach the micro:bit as shown
below (assuming you want to drive the pixels from pin 0 - you can connect
Expand All @@ -51,12 +53,13 @@ Classes

.. py:class::
NeoPixel(pin, n)
NeoPixel(pin, n, 4)
NeoPixel(pin, n, bpp)

Initialise a new strip of ``n`` number of neopixel LEDs controlled via pin
``pin``. For **V2** micro:bit boards that support RGBW neopixels, a third
value can be passed to ``NeoPixel`` to indicate the number of bytes per
pixel is 4 rather than the default of 3.
``pin``. The **V2** micro:bit can also support RGBW neopixels, so a third
argument can be passed to ``NeoPixel`` to indicate the number of bytes per
pixel (bpp). For RGBW, this is is ``4`` rather than the default of 3 for
RGB and GRB.

Each pixel is addressed by a position (starting from 0). Neopixels
are given RGB (red, green, blue) / RGBW (red, green, blue, white) **V2**
Expand Down