@@ -36,16 +36,10 @@ This is easily achieved by downloading
3636or individual libraries can be installed using
3737`circup <https://github.com/adafruit/circup >`_.
3838
39- .. todo :: Describe the Adafruit product this library works with. For PCBs, you can also add the
40- image from the assets folder in the PCB's GitHub repo.
39+ * `NeoPixel Products <https://www.adafruit.com/category/168 >`_
4140
42- `Purchase one from the Adafruit shop <http://www.adafruit.com/products/ >`_
4341Installing from PyPI
4442=====================
45- .. note :: This library is not available on PyPI yet. Install documentation is included
46- as a standard element. Stay tuned for PyPI availability!
47-
48- .. todo :: Remove the above note if PyPI version is/will be available at time of release.
4943
5044On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
5145PyPI <https://pypi.org/project/adafruit-circuitpython-pixelmap/> `_.
@@ -85,7 +79,7 @@ following command to install:
8579
8680.. code-block :: shell
8781
88- circup install pixelmap
82+ circup install adafruit_pixelmap
8983
9084 Or the following command to update an existing version:
9185
@@ -96,8 +90,37 @@ Or the following command to update an existing version:
9690 Usage Example
9791=============
9892
99- .. todo :: Add a quick, simple example. It and other examples should live in the
100- examples folder and be included in docs/examples.rst.
93+ .. code-block :: python
94+
95+ import board
96+ import neopixel
97+ import time
98+ from adafruit_pixelmap import PixelMap, horizontal_strip_gridmap, vertical_strip_gridmap
99+
100+ # Update to match the pin connected to your NeoPixels
101+ pixel_pin = board.NEOPIXEL
102+
103+ # Update to match the number of NeoPixels you have connected
104+ pixel_num = 32
105+
106+ pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness = 0.1 , auto_write = True )
107+
108+ pixel_wing_vertical = PixelMap.vertical_lines(
109+ pixels, 8 , 4 , horizontal_strip_gridmap(8 , alternating = False )
110+ )
111+ pixel_wing_horizontal = PixelMap.horizontal_lines(
112+ pixels, 8 , 4 , horizontal_strip_gridmap(8 , alternating = False )
113+ )
114+
115+ for row in range (len (pixel_wing_horizontal)):
116+ pixels.fill(0x 00000 )
117+ pixel_wing_horizontal[row] = 0x 00ff00
118+ time.sleep(0.3 )
119+
120+ for row in range (len (pixel_wing_vertical)):
121+ pixels.fill(0x 00000 )
122+ pixel_wing_vertical[row] = 0x ff00ff
123+ time.sleep(0.3 )
101124
102125 Documentation
103126=============
0 commit comments