-
Notifications
You must be signed in to change notification settings - Fork 23
Improve Ref Docs #9
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
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
97d91b5
renamed simple example; no learn guides are affected
sommersoft 8d1632f
setup docs folder
sommersoft 679c764
updated .travis & .readthedocs yml
sommersoft 44a5917
updated README
sommersoft f81a9fc
removed extraneous sphinx file; setup.py
sommersoft 1c62572
updated info docstring
sommersoft 06a9595
sphinx fix
sommersoft 647d2de
sphinx fix2
sommersoft 0007a20
sphinx indentation fixes
sommersoft 94f5003
pylint fix; sneaky whitespace is sneaky
sommersoft cf4191f
docstring fixes
sommersoft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,14 +26,24 @@ | |
|
||
CircuitPython driver for the IS31FL3731 charlieplex IC. | ||
|
||
This driver supports the following hardware: | ||
|
||
* Author(s): Tony DiCola | ||
|
||
Implementation Notes | ||
-------------------- | ||
|
||
**Hardware:** | ||
|
||
* `Adafruit 16x9 Charlieplexed PWM LED Matrix Driver - IS31FL3731 | ||
<https://www.adafruit.com/product/2946>`_ | ||
<https://www.adafruit.com/product/2946>`_ | ||
|
||
* `Adafruit 15x7 CharliePlex LED Matrix Display FeatherWings | ||
<https://www.adafruit.com/product/2965>`_ | ||
<https://www.adafruit.com/product/2965>`_ | ||
|
||
* Author(s): Tony DiCola | ||
**Software and Dependencies:** | ||
|
||
* Adafruit CircuitPython firmware (2.2.0+) for the ESP8622 and M0-based boards: | ||
https://github.com/adafruit/circuitpython/releases | ||
""" | ||
|
||
# imports | ||
|
@@ -68,9 +78,11 @@ | |
_COLOR_OFFSET = const(0x24) | ||
|
||
class Matrix: | ||
"""The Matrix class support the main function for driving the 16x9 matrix Display | ||
:param ~adafruit_bus_device.i2c_device i2c_device: the connected i2c bus i2c_device | ||
:param address: the device address; defaults to 0x74 | ||
""" | ||
The Matrix class support the main function for driving the 16x9 matrix Display | ||
|
||
:param ~adafruit_bus_device.i2c_device i2c_device: the connected i2c bus i2c_device | ||
:param address: the device address; defaults to 0x74 | ||
""" | ||
width = 16 | ||
height = 9 | ||
|
@@ -144,16 +156,20 @@ def reset(self): | |
self.sleep(False) | ||
|
||
def sleep(self, value): | ||
"""Set the Software Shutdown Register bit | ||
:param value: True to set software shutdown bit; False unset | ||
""" | ||
Set the Software Shutdown Register bit | ||
|
||
:param value: True to set software shutdown bit; False unset | ||
""" | ||
return self._register(_CONFIG_BANK, _SHUTDOWN_REGISTER, not value) | ||
|
||
def autoplay(self, delay=0, loops=0, frames=0): | ||
"""Start autoplay | ||
:param delay: in ms | ||
:param loops: number of loops - 0->7 | ||
:param frames: number of frames: 0->7 | ||
""" | ||
Start autoplay | ||
|
||
:param delay: in ms | ||
:param loops: number of loops - 0->7 | ||
:param frames: number of frames: 0->7 | ||
""" | ||
if delay == 0: | ||
self._mode(_PICTURE_MODE) | ||
|
@@ -171,12 +187,14 @@ def autoplay(self, delay=0, loops=0, frames=0): | |
|
||
|
||
def fade(self, fade_in=None, fade_out=None, pause=0): | ||
"""Start and stop the fade feature. If both fade_in and fade_out are None (the | ||
""" | ||
Start and stop the fade feature. If both fade_in and fade_out are None (the | ||
default), the breath feature is used for fading. if fade_in is None, then | ||
fade_in = fade_out. If fade_out is None, then fade_out = fade_in | ||
:param fade_in: positive number; 0->100 | ||
:param fade-out: positive number; 0->100 | ||
:param pause: breath register 2 pause value | ||
|
||
:param fade_in: positive number; 0->100 | ||
:param fade-out: positive number; 0->100 | ||
:param pause: breath register 2 pause value | ||
""" | ||
if fade_in is None and fade_out is None: | ||
self._register(_CONFIG_BANK, _BREATH2_REGISTER, 0) | ||
|
@@ -197,9 +215,11 @@ def fade(self, fade_in=None, fade_out=None, pause=0): | |
self._register(_CONFIG_BANK, _BREATH2_REGISTER, 1 << 4 | pause) | ||
|
||
def frame(self, frame=None, show=True): | ||
"""Set the current frame | ||
:param frame: frame number; 0-7 or None. If None function returns current frame | ||
:param show: True to show the frame; False to don't force a show | ||
""" | ||
Set the current frame | ||
|
||
:param frame: frame number; 0-7 or None. If None function returns current frame | ||
:param show: True to show the frame; False to don't force a show | ||
""" | ||
if frame is None: | ||
return self._frame | ||
|
@@ -246,10 +266,12 @@ def blink(self, rate=None): | |
return None | ||
|
||
def fill(self, color=None, blink=None, frame=None): | ||
"""Fill the display with a brightness level | ||
:param color: brightness 0->255 | ||
:param blink: True if blinking is required | ||
:param frame: which frame to fill 0->7 | ||
""" | ||
Fill the display with a brightness level | ||
|
||
:param color: brightness 0->255 | ||
:param blink: True if blinking is required | ||
:param frame: which frame to fill 0->7 | ||
""" | ||
if frame is None: | ||
frame = self._frame | ||
|
@@ -279,12 +301,14 @@ def pixel_addr(x, y): | |
|
||
#pylint: disable-msg=too-many-arguments | ||
def pixel(self, x, y, color=None, blink=None, frame=None): | ||
"""Set blink or brightness for an x,y pixel | ||
:param x: horizontal pixel position | ||
:param y: vertical pixel position | ||
:param color: brightness value 0->255 | ||
:param blink: True to blink | ||
:param frame: the frame to set the pixel | ||
""" | ||
Set blink or brightness for an x,y pixel | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change to |
||
|
||
:param x: horizontal pixel position | ||
:param y: vertical pixel position | ||
:param color: brightness value 0->255 | ||
:param blink: True to blink | ||
:param frame: the frame to set the pixel | ||
""" | ||
if not 0 <= x <= self.width: | ||
return None | ||
|
Binary file not shown.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Simple test | ||
------------ | ||
|
||
Ensure your device works with this simple test. | ||
|
||
.. literalinclude:: ../examples/is31fl3731_simpletest.py | ||
:caption: examples/is31fl3731_simpletest.py | ||
:linenos: | ||
|
||
|
||
For other examples, see the GitHub `examples folder <https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731/tree/master/examples>`_. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.. include:: ../README.rst | ||
|
||
Table of Contents | ||
================= | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
:hidden: | ||
|
||
self | ||
|
||
.. toctree:: | ||
:caption: Examples | ||
|
||
examples | ||
|
||
.. toctree:: | ||
:caption: API Reference | ||
:maxdepth: 3 | ||
|
||
api | ||
|
||
.. toctree:: | ||
:caption: Tutorials | ||
|
||
.. toctree:: | ||
:caption: Related Products | ||
|
||
Charlieplex Devices <https://www.adafruit.com/?q=charlieplex> | ||
|
||
.. toctree:: | ||
:caption: Other Links | ||
|
||
Download <https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731/releases/latest> | ||
CircuitPython Reference Documentation <https://circuitpython.readthedocs.io> | ||
CircuitPython Support Forum <https://forums.adafruit.com/viewforum.php?f=60> | ||
Discord Chat <https://adafru.it/discord> | ||
Adafruit Learning System <https://learn.adafruit.com> | ||
Adafruit Blog <https://blog.adafruit.com> | ||
Adafruit Store <https://www.adafruit.com> | ||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change this line to
True to show the frame; False to not show
.