Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rm-hull committed Jan 22, 2017
1 parent b3880cd commit 676a861
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Expand Up @@ -4,7 +4,7 @@ ChangeLog
+------------+----------------------------------------------------------------------+------------+
| Version | Description | Date |
+============+======================================================================+============+
| *Upcoming* | *TBC* | |
| *Upcoming* | * Add support for WS2812 NeoPixel strips/arrays | |
+------------+----------------------------------------------------------------------+------------+
| **0.3.3** | * Fix for dot muncher: not handling full-stop at line end | 2017/01/21 |
| | * Documentation updates | |
Expand Down
25 changes: 19 additions & 6 deletions doc/install.rst
Expand Up @@ -69,11 +69,25 @@ Board Pin Name Remarks RPi Pin RPi Function
WS2812 NeoPixels (DMA)
^^^^^^^^^^^^^^^^^^^^^^

Pre-requisites
""""""""""""""

GPIO pin-outs
"""""""""""""
Typically, neopixels reqire VCC, VSS (GND) and DI pins connecting to the
Raspberry Pi, where the DI pin is usually connected to a PWM control pin
such as GPIO 18.

============ ====== ============= ========= ====================
Board Pin Name Remarks RPi Pin RPi Function
------------ ------ ------------- --------- --------------------
1 DO Data Out - -
2 DI Data In 12 GPIO 18 (PWM0)
3 VCC +5V Power 2 5V0
4 NC Not connected - -
5 VDD Not connected - -
6 VSS Ground 6 GND
============ ====== ============= ========= ====================

The DO pin should be connected to the DI pin on the next (daisy-chained)
neopixel, while the VCC and VSS are supplied in-parallel to all LED's.

Installing from PyPi
^^^^^^^^^^^^^^^^^^^^
Expand All @@ -99,8 +113,8 @@ Raspbian
.. code:: bash
$ cd luma.led_matrix
$ sudo apt-get install python-dev python-pip
$ sudo pip install spidev
$ sudo usermod -a -G spi,gpio pi
$ sudo apt-get install python-dev python-pip libfreetype6-dev libjpeg8-dev libsdl1.2-dev
$ sudo python setup.py install
Arch Linux
Expand All @@ -109,5 +123,4 @@ Arch Linux
cd luma.led_matrix
pacman -Sy base-devel python2
pip install spidev
python2 setup.py install
10 changes: 8 additions & 2 deletions doc/python-usage.rst
Expand Up @@ -260,16 +260,22 @@ initialize the device with ``width=N`` and ``height=N`` attributes instead:
draw.line((6, 0, 6, device.height), fill="violet")
draw.line((7, 0, 7, device.height), fill="white")
.. note::
The neopixel driver uses the `ws2812 <https://pypi.python.org/pypi/ws2812>`_
PyPi package to interface to the daisychained LEDs. It uses DMA (direct memory
access) via ``/dev/mem`` which means that it has to run in privileged mode
(via ``sudo`` root access).

Examples
^^^^^^^^
Ensure you have followed the installation instructions in the next section.
Run the example code as follows::

$ sudo python examples/matrix_demo.py
$ python examples/matrix_demo.py

or::

$ sudo python examples/sevensegment_demo.py
$ python examples/sevensegment_demo.py

or::

Expand Down

0 comments on commit 676a861

Please sign in to comment.