Skip to content

Commit 4c9b9f2

Browse files
Update neopixel docs. (#82)
When we synced with the readthedocs content V1 didn't have support for RGBW pixels. This has since been addressed. Closes #81
1 parent 0396c0b commit 4c9b9f2

File tree

8 files changed

+65
-9
lines changed

8 files changed

+65
-9
lines changed

lang/en/typeshed/stdlib/neopixel.pyi

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@ class NeoPixel:
99
1010
Example: ``np = neopixel.NeoPixel(pin0, 8)``
1111
12-
RGBW neopixels are only supported by micro:bit V2.
12+
To support RGBW neopixels, a third argument can be passed to
13+
``NeoPixel`` to indicate the number of bytes per pixel (``bpp``).
14+
For RGBW, this is is 4 rather than the default of 3 for RGB and GRB.
15+
16+
Each pixel is addressed by a position (starting from 0). Neopixels are
17+
given RGB (red, green, blue) / RGBW (red, green, blue, white) values
18+
between 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is
19+
white. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white.
1320
1421
See `the online docs <https://microbit-micropython.readthedocs.io/en/v2-docs/neopixel.html>`_ for warnings and other advice.
1522
1623
:param pin: The pin controlling the neopixel strip.
1724
:param n: The number of neopixels in the strip.
18-
:param bpp: Bytes per pixel. For micro:bit V2 RGBW neopixel support, pass 4 rather than the default of 3 for RGB and GRB.
25+
:param bpp: Bytes per pixel. For RGBW neopixel support, pass 4 rather than the default of 3 for RGB and GRB.
1926
"""
2027
...
2128
def clear(self) -> None:

lang/es-es/typeshed/stdlib/neopixel.pyi

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ class NeoPixel:
99
1010
Example: ``np = neopixel.NeoPixel(pin0, 8)``
1111
12-
RGBW neopixels are only supported by micro:bit V2.
12+
To support RGBW neopixels, a third argument can be passed to
13+
``NeoPixel`` to indicate the number of bytes per pixel (``bpp``).
14+
For RGBW, this is is 4 rather than the default of 3 for RGB and GRB.
15+
16+
Each pixel is addressed by a position (starting from 0). Neopixels are
17+
given RGB (red, green, blue) / RGBW (red, green, blue, white) values
18+
between 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is
19+
white. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white.
1320
1421
See `the online docs <https://microbit-micropython.readthedocs.io/en/v2-docs/neopixel.html>`_ for warnings and other advice.
1522

lang/fr/typeshed/stdlib/neopixel.pyi

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ class NeoPixel:
99
1010
Example: ``np = neopixel.NeoPixel(pin0, 8)``
1111
12-
RGBW neopixels are only supported by micro:bit V2.
12+
To support RGBW neopixels, a third argument can be passed to
13+
``NeoPixel`` to indicate the number of bytes per pixel (``bpp``).
14+
For RGBW, this is is 4 rather than the default of 3 for RGB and GRB.
15+
16+
Each pixel is addressed by a position (starting from 0). Neopixels are
17+
given RGB (red, green, blue) / RGBW (red, green, blue, white) values
18+
between 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is
19+
white. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white.
1320
1421
See `the online docs <https://microbit-micropython.readthedocs.io/en/v2-docs/neopixel.html>`_ for warnings and other advice.
1522

lang/ja/typeshed/stdlib/neopixel.pyi

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ class NeoPixel:
99
1010
Example: ``np = neopixel.NeoPixel(pin0, 8)``
1111
12-
RGBW neopixels are only supported by micro:bit V2.
12+
To support RGBW neopixels, a third argument can be passed to
13+
``NeoPixel`` to indicate the number of bytes per pixel (``bpp``).
14+
For RGBW, this is is 4 rather than the default of 3 for RGB and GRB.
15+
16+
Each pixel is addressed by a position (starting from 0). Neopixels are
17+
given RGB (red, green, blue) / RGBW (red, green, blue, white) values
18+
between 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is
19+
white. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white.
1320
1421
See `the online docs <https://microbit-micropython.readthedocs.io/en/v2-docs/neopixel.html>`_ for warnings and other advice.
1522

lang/ko/typeshed/stdlib/neopixel.pyi

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ class NeoPixel:
99
1010
Example: ``np = neopixel.NeoPixel(pin0, 8)``
1111
12-
RGBW neopixels are only supported by micro:bit V2.
12+
To support RGBW neopixels, a third argument can be passed to
13+
``NeoPixel`` to indicate the number of bytes per pixel (``bpp``).
14+
For RGBW, this is is 4 rather than the default of 3 for RGB and GRB.
15+
16+
Each pixel is addressed by a position (starting from 0). Neopixels are
17+
given RGB (red, green, blue) / RGBW (red, green, blue, white) values
18+
between 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is
19+
white. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white.
1320
1421
See `the online docs <https://microbit-micropython.readthedocs.io/en/v2-docs/neopixel.html>`_ for warnings and other advice.
1522

lang/nl/typeshed/stdlib/neopixel.pyi

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ class NeoPixel:
99
1010
Example: ``np = neopixel.NeoPixel(pin0, 8)``
1111
12-
RGBW neopixels are only supported by micro:bit V2.
12+
To support RGBW neopixels, a third argument can be passed to
13+
``NeoPixel`` to indicate the number of bytes per pixel (``bpp``).
14+
For RGBW, this is is 4 rather than the default of 3 for RGB and GRB.
15+
16+
Each pixel is addressed by a position (starting from 0). Neopixels are
17+
given RGB (red, green, blue) / RGBW (red, green, blue, white) values
18+
between 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is
19+
white. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white.
1320
1421
See `the online docs <https://microbit-micropython.readthedocs.io/en/v2-docs/neopixel.html>`_ for warnings and other advice.
1522

lang/zh-cn/typeshed/stdlib/neopixel.pyi

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ class NeoPixel:
99
1010
Example: ``np = neopixel.NeoPixel(pin0, 8)``
1111
12-
RGBW neopixels are only supported by micro:bit V2.
12+
To support RGBW neopixels, a third argument can be passed to
13+
``NeoPixel`` to indicate the number of bytes per pixel (``bpp``).
14+
For RGBW, this is is 4 rather than the default of 3 for RGB and GRB.
15+
16+
Each pixel is addressed by a position (starting from 0). Neopixels are
17+
given RGB (red, green, blue) / RGBW (red, green, blue, white) values
18+
between 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is
19+
white. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white.
1320
1421
See `the online docs <https://microbit-micropython.readthedocs.io/en/v2-docs/neopixel.html>`_ for warnings and other advice.
1522

lang/zh-tw/typeshed/stdlib/neopixel.pyi

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@ class NeoPixel:
99
1010
Example: ``np = neopixel.NeoPixel(pin0, 8)``
1111
12-
RGBW neopixels are only supported by micro:bit V2.
12+
To support RGBW neopixels, a third argument can be passed to
13+
``NeoPixel`` to indicate the number of bytes per pixel (``bpp``).
14+
For RGBW, this is is 4 rather than the default of 3 for RGB and GRB.
15+
16+
Each pixel is addressed by a position (starting from 0). Neopixels are
17+
given RGB (red, green, blue) / RGBW (red, green, blue, white) values
18+
between 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is
19+
white. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white.
1320
1421
See `the online docs <https://microbit-micropython.readthedocs.io/en/v2-docs/neopixel.html>`_ for warnings and other advice.
1522

0 commit comments

Comments
 (0)