changeset 6:4bda3a0f45fd default tip

Fix usage examples
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Sat, 09 Jul 2016 14:45:54 +0200
parents 1529be32fe55
children
files is31fl3731.py
diffstat 1 files changed, 18 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/is31fl3731.py	Sat Jul 09 14:23:34 2016 +0200
+++ b/is31fl3731.py	Sat Jul 09 14:45:54 2016 +0200
@@ -26,20 +26,19 @@
 _COLOR_OFFSET = const(0x24)
 
 class Matrix:
+    """
+    Driver for the IS31FL3731 charlieplexed 16x9 LED matrix.
+
+    >>> import is31fl3731
+    >>> from machine import I2C, Pin
+    >>> i2c = I2C(Pin(5), Pin(4))
+    >>> display = is31fl3731.Matrix(i2c)
+    >>> display.fill(127)
+    """
     width = 16
     height = 9
 
     def __init__(self, i2c, address=0x74):
-        """
-        Driver for the IS31FL3731 charlieplexed LED matrix.
-
-        >>> import is31fl3731
-        >>> from machine import I2C, Pin
-        >>> i2c = I2C(Pin(5), Pin(4))
-        >>> display = is31fl3731.Matrix(i2c)
-        >>> display.fill(127)
-        >>> display.show()
-        """
         self.i2c = i2c
         self.address = address
         self.reset()
@@ -233,6 +232,15 @@
 
 
 class CharlieWing(Matrix):
+    """
+    Driver for the 15x7 CharlieWing Adafruit FeatherWing.
+
+    >>> import is31fl3731
+    >>> from machine import I2C, Pin
+    >>> i2c = I2C(Pin(5), Pin(4))
+    >>> display = is31fl3731.CharlieWing(i2c)
+    >>> display.fill(127)
+    """
     width = 15
     height = 7