Skip to content

Commit 03f511d

Browse files
Add all the examples to the documentation.
Some minor improvements to the docs.
1 parent c9be8bd commit 03f511d

File tree

8 files changed

+92
-37
lines changed

8 files changed

+92
-37
lines changed

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Introduction
32
============
43

@@ -15,6 +14,7 @@ Introduction
1514
:alt: Build Status
1615

1716
This library is compatible with standard Character LCDs such as:
17+
1818
* `Adafruit Standard LCD 16x2 <https://www.adafruit.com/product/181>`_
1919
* `Adafruit RGB backlight negative LCD 16x2 <https://www.adafruit.com/product/399>`_
2020
* `Adafruit RGB backlight negative LCD 20x4 <https://www.adafruit.com/product/498>`_
@@ -58,8 +58,8 @@ I2C & SPI displays also depend on:
5858
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_
5959

6060
Please ensure all dependencies are available on the CircuitPython filesystem.
61-
This is easily achieved by downloading
62-
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
61+
This is easily achieved by downloading the
62+
`Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
6363

6464
Usage Example
6565
=============

adafruit_character_lcd/character_lcd.py

100755100644
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
**Hardware:**
1919
20-
"* `Adafruit Character LCDs <http://www.adafruit.com/category/63_96>`_"
20+
* `Adafruit Character LCDs <http://www.adafruit.com/category/63_96>`_
2121
2222
**Software and Dependencies:**
2323
@@ -620,9 +620,12 @@ class Character_LCD_RGB(Character_LCD):
620620
:param ~digitalio.DigitalInOut db7: The data line 7
621621
:param columns: The columns on the charLCD
622622
:param lines: The lines on the charLCD
623-
:param ~pwmio.PWMOut, ~digitalio.DigitalInOut red: Red RGB Anode
624-
:param ~pwmio.PWMOut, ~digitalio.DigitalInOut green: Green RGB Anode
625-
:param ~pwmio.PWMOut, ~digitalio.DigitalInOut blue: Blue RGB Anode
623+
:param red: Red RGB Anode
624+
:type red: ~pwmio.PWMOut or ~digitalio.DigitalInOut
625+
:param green: Green RGB Anode
626+
:type green: ~pwmio.PWMOut or ~digitalio.DigitalInOut
627+
:param blue: Blue RGB Anode
628+
:type blue: ~pwmio.PWMOut or ~digitalio.DigitalInOut
626629
:param ~digitalio.DigitalInOut read_write: The rw pin. Determines whether to read to or
627630
write from the display. Not necessary if only writing to the display. Used on shield.
628631

adafruit_character_lcd/character_lcd_i2c.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
**Hardware:**
1717
18-
"* `I2C / SPI character LCD backpack <https://www.adafruit.com/product/292>`_"
18+
* `I2C / SPI character LCD backpack <https://www.adafruit.com/product/292>`_
1919
2020
**Software and Dependencies:**
2121
@@ -36,8 +36,8 @@
3636
class Character_LCD_I2C(Character_LCD_Mono):
3737
# pylint: disable=too-few-public-methods, too-many-arguments
3838
"""Character LCD connected to I2C/SPI backpack using its I2C connection.
39-
This is a subclass of Character_LCD and implements all of the same
40-
functions and functionality.
39+
This is a subclass of `Character_LCD_Mono` and implements all of the
40+
same functions and functionality.
4141
4242
To use, import and initialise as follows:
4343

adafruit_character_lcd/character_lcd_rgb_i2c.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: MIT
44

55
"""
6-
`adafruit_character_lcd.character_lcd_i2c`
6+
`adafruit_character_lcd.character_lcd_rgb_i2c`
77
====================================================
88
99
Module for using I2C with I2C RGB LCD Shield or I2C RGB LCD Pi Plate
@@ -15,17 +15,17 @@
1515
1616
**Hardware:**
1717
18-
"* `RGB LCD Shield Kit w/ 16x2 Character Display - Negative Display
19-
<https://www.adafruit.com/product/714>`_"
18+
* `RGB LCD Shield Kit w/ 16x2 Character Display - Negative Display
19+
<https://www.adafruit.com/product/714>`_
2020
21-
"* `RGB LCD Shield Kit w/ 16x2 Character Display - Positive Display
22-
<https://www.adafruit.com/product/716>`_"
21+
* `RGB LCD Shield Kit w/ 16x2 Character Display - Positive Display
22+
<https://www.adafruit.com/product/716>`_
2323
24-
"* `Adafruit RGB Negative 16x2 LCD+Keypad Kit for Raspberry Pi
25-
<https://www.adafruit.com/product/1110>`_"
24+
* `Adafruit RGB Negative 16x2 LCD+Keypad Kit for Raspberry Pi
25+
<https://www.adafruit.com/product/1110>`_
2626
27-
"* `Adafruit RGB Positive 16x2 LCD+Keypad Kit for Raspberry Pi
28-
<https://www.adafruit.com/product/1109>`_"
27+
* `Adafruit RGB Positive 16x2 LCD+Keypad Kit for Raspberry Pi
28+
<https://www.adafruit.com/product/1109>`_
2929
3030
**Software and Dependencies:**
3131
@@ -46,7 +46,7 @@
4646

4747
class Character_LCD_RGB_I2C(Character_LCD_RGB):
4848
"""RGB Character LCD connected to I2C shield or Pi plate using I2C connection.
49-
This is a subclass of Character_LCD_RGB and implements all of the same
49+
This is a subclass of `Character_LCD_RGB` and implements all of the same
5050
functions and functionality.
5151
5252
To use, import and initialise as follows:

adafruit_character_lcd/character_lcd_spi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
**Hardware:**
1717
18-
"* `I2C / SPI character LCD backpack <https://www.adafruit.com/product/292>`_"
18+
* `I2C / SPI character LCD backpack <https://www.adafruit.com/product/292>`_
1919
2020
**Software and Dependencies:**
2121
@@ -35,7 +35,7 @@
3535

3636
class Character_LCD_SPI(Character_LCD_Mono): # pylint: disable=too-few-public-methods
3737
"""Character LCD connected to I2C/SPI backpack using its SPI connection.
38-
This is a subclass of Character_LCD and implements all of the same
38+
This is a subclass of `Character_LCD_Mono` and implements all of the same
3939
functions and functionality.
4040
4141
To use, import and initialise as follows:

docs/api.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
.. If you created a package, create one automodule per module in the package.
32
43
.. automodule:: adafruit_character_lcd.character_lcd
@@ -7,8 +6,8 @@
76
.. automodule:: adafruit_character_lcd.character_lcd_i2c
87
:members:
98

10-
.. automodule:: adafruit_character_lcd.character_lcd_spi
9+
.. automodule:: adafruit_character_lcd.character_lcd_rgb_i2c
1110
:members:
1211

13-
.. automodule:: adafruit_character_lcd.character_lcd_rgb_i2c
12+
.. automodule:: adafruit_character_lcd.character_lcd_spi
1413
:members:

docs/conf.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Uncomment the below if you use native CircuitPython modules such as
2424
# digitalio, micropython and busio. List the modules you use. Without it, the
2525
# autodoc module docs will fail to generate with a warning.
26-
# autodoc_mock_imports = ["micropython", "digitalio", "addfruit_bus_device"]
26+
autodoc_mock_imports = ["micropython", "board", "busio", "digitalio", "pwmio"]
2727

2828
intersphinx_mapping = {
2929
"python": ("https://docs.python.org/3.4", None),
@@ -43,7 +43,7 @@
4343
master_doc = "index"
4444

4545
# General information about the project.
46-
project = "Adafruit CIRCUITPYTHON_CHARLCD Library"
46+
project = "Adafruit CircuitPython_CharLCD Library"
4747
copyright = "2017 Brent Rubell"
4848
author = "Brent Rubell"
4949

@@ -118,7 +118,7 @@
118118
html_favicon = "_static/favicon.ico"
119119

120120
# Output file base name for HTML help builder.
121-
htmlhelp_basename = "AdafruitCIRCUITPYTHON_CHARLCDLibrarydoc"
121+
htmlhelp_basename = "AdafruitCircuitPython_CharLCDLibrarydoc"
122122

123123
# -- Options for LaTeX output ---------------------------------------------
124124

@@ -143,8 +143,8 @@
143143
latex_documents = [
144144
(
145145
master_doc,
146-
"AdafruitCIRCUITPYTHON_CHARLCDLibrary.tex",
147-
"Adafruit CIRCUITPYTHON_CHARLCD Library Documentation",
146+
"AdafruitCircuitPython_CharLCDLibrary.tex",
147+
"Adafruit CircuitPython_CharLCD Library Documentation",
148148
author,
149149
"manual",
150150
),
@@ -157,8 +157,8 @@
157157
man_pages = [
158158
(
159159
master_doc,
160-
"adafruitCIRCUITPYTHON_CHARLCDlibrary",
161-
"Adafruit CIRCUITPYTHON_CHARLCD Library Documentation",
160+
"adafruitCircuitPython_CharLCDlibrary",
161+
"Adafruit CircuitPython_CharLCD Library Documentation",
162162
[author],
163163
1,
164164
)
@@ -172,10 +172,10 @@
172172
texinfo_documents = [
173173
(
174174
master_doc,
175-
"AdafruitCIRCUITPYTHON_CHARLCDLibrary",
176-
"Adafruit CIRCUITPYTHON_CHARLCD Library Documentation",
175+
"AdafruitCircuitPython_CharLCDLibrary",
176+
"Adafruit CircuitPython_CharLCD Library Documentation",
177177
author,
178-
"AdafruitCIRCUITPYTHON_CHARLCDLibrary",
178+
"AdafruitCircuitPython_CharLCDLibrary",
179179
"One line description of project.",
180180
"Miscellaneous",
181181
),

docs/examples.rst

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,77 @@
1-
Simple test
1+
Simple tests
22
------------
33

4-
Ensure your device works with this simple test.
4+
Ensure your device works with these simple tests.
5+
6+
Mono
7+
====
58

69
.. literalinclude:: ../examples/charlcd_mono_simpletest.py
710
:caption: examples/charlcd_mono_simpletest.py
811
:linenos:
912

13+
RGB
14+
===
15+
1016
.. literalinclude:: ../examples/charlcd_rgb_simpletest.py
1117
:caption: examples/charlcd_rgb_simpletest.py
1218
:linenos:
1319

20+
I2C Mono
21+
========
22+
1423
.. literalinclude:: ../examples/charlcd_i2c_mono_simpletest.py
1524
:caption: examples/charlcd_i2c_mono_simpletest.py
1625
:linenos:
1726

27+
I2C RGB
28+
=======
29+
30+
.. literalinclude:: ../examples/charlcd_i2c_rgb_simpletest.py
31+
:caption: examples/charlcd_i2c_rgb_simpletest.py
32+
:linenos:
33+
34+
SPI Mono
35+
========
36+
1837
.. literalinclude:: ../examples/charlcd_spi_mono_simpletest.py
1938
:caption: examples/charlcd_spi_mono_simpletest.py
2039
:linenos:
2140

41+
Keypad
42+
======
43+
2244
.. literalinclude:: ../examples/charlcd_keypad_simpletest.py
2345
:caption: examples/charlcd_keypad_simpletest.py
2446
:linenos:
47+
48+
Raspberry Pi Mono
49+
=================
50+
51+
.. literalinclude:: ../examples/charlcd_rpi_mono_simpletest.py
52+
:caption: examples/charlcd_rpi_mono_simpletest.py
53+
:linenos:
54+
55+
Raspberry Pi RGB
56+
================
57+
58+
.. literalinclude:: ../examples/charlcd_rpi_rgb_simpletest.py
59+
:caption: examples/charlcd_rpi_rgb_simpletest.py
60+
:linenos:
61+
62+
Other tests
63+
-----------
64+
65+
Custom Character
66+
================
67+
68+
.. literalinclude:: ../examples/charlcd_customcharacter.py
69+
:caption: examples/charlcd_customcharacter.py
70+
:linenos:
71+
72+
Nyan Cat
73+
========
74+
75+
.. literalinclude:: ../examples/charlcd_custom_character_nyan_cat.py
76+
:caption: examples/charlcd_custom_character_nyan_cat.py
77+
:linenos:

0 commit comments

Comments
 (0)