Skip to content

Add multitrellis to docs and fix a couple of typos #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adafruit_neotrellis/multitrellis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: MIT

"""
interface for connecting together multiple NeoTrellis boards.
Interface for connecting together multiple NeoTrellis boards.
"""

# imports
Expand Down
3 changes: 3 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@

.. automodule:: adafruit_neotrellis.neotrellis
:members:

.. automodule:: adafruit_neotrellis.multitrellis
:members:
9 changes: 9 additions & 0 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ Ensure your device works with this simple test.
.. literalinclude:: ../examples/neotrellis_simpletest.py
:caption: examples/neotrellis_simpletest.py
:linenos:

MultiTrellis test
------------------

The multitrellis submodule helps manage multiple trellis as one.

.. literalinclude:: ../examples/neotrellis_multitrellis_simpletest.py
:caption: examples/neotrellis_multitrellis_simpletest.py
:linenos:
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Table of Contents

.. toctree::
:caption: Examples
:maxdepth: 3

examples

Expand Down
2 changes: 1 addition & 1 deletion examples/neotrellis_multitrellis_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def blink(xcoord, ycoord, edge):
# turn the LED on when a rising edge is detected
if edge == NeoTrellis.EDGE_RISING:
trellis.color(xcoord, ycoord, BLUE)
# turn the LED off when a rising edge is detected
# turn the LED off when a falling edge is detected
elif edge == NeoTrellis.EDGE_FALLING:
trellis.color(xcoord, ycoord, OFF)

Expand Down
2 changes: 1 addition & 1 deletion examples/neotrellis_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def blink(event):
# turn the LED on when a rising edge is detected
if event.edge == NeoTrellis.EDGE_RISING:
trellis.pixels[event.number] = CYAN
# turn the LED off when a rising edge is detected
# turn the LED off when a falling edge is detected
elif event.edge == NeoTrellis.EDGE_FALLING:
trellis.pixels[event.number] = OFF

Expand Down