Skip to content

Commit

Permalink
add examples to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
s-light committed Nov 29, 2018
1 parent d78e776 commit df1e10d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ Ensure your device works with this simple test.
:linenos:


Simple HW test
------------------------------------------

This example lights up every LED after each other.
Its great for production testing your boards.

.. literalinclude:: ../examples/pixel_checker.py
:caption: examples/pixel_checker.py
:linenos:


TLC5957 with FancyLED
------------------------------------------

Expand All @@ -16,3 +27,12 @@ Example how to combine TLC5957 with FancyLED.
.. literalinclude:: ../examples/tlc5957_fancyled.py
:caption: examples/tlc5957_fancyled.py
:linenos:

TLC5957 with custom 2D-Array mapping
------------------------------------------

Example how to create a pixel-mapping with TLC5957.

.. literalinclude:: ../examples/tlc5957_2d_array.py
:caption: examples/tlc5957_2d_array.py
:linenos:
1 change: 1 addition & 0 deletions examples/tlc5957_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
spi = bitbangio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)

# 6MHz for the grayscale clock
gsclk = pulseio.PWMOut(
board.D9, duty_cycle=(2 ** 15), frequency=(6000 * 1000))

Expand Down

0 comments on commit df1e10d

Please sign in to comment.