You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please ensure all dependencies are available on the CircuitPython filesystem.
20
31
This is easily achieved by downloading
21
-
[the Adafruit library and driver bundle.](https://github.com/adafruit/Adafruit_CircuitPython_Bundle)
32
+
`the Adafruit library and driver bundle<https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
22
33
23
34
Usage Example
24
35
=============
25
36
26
37
The ``Character_LCD`` class interfaces a predefined Character LCD display with CircuitPython.
27
38
39
+
.. code-block:: python
40
+
28
41
import adafruit_character_lcd
29
42
30
43
You must define the data pins (``RS``, ``EN``, ``D4``, ``D5``, ``D6``, ``D7``) in your code before using the ``Character_LCD`` class.
31
44
If you want to have on/off ``backlight`` functionality, you can also define your backlight as ``lcd_backlight``. Otherwise, the backlight will always remain on. An example of this is below
32
45
46
+
.. code-block:: python
47
+
33
48
lcd_rs = digitalio.DigitalInOut(D7)
34
49
lcd_en = digitalio.DigitalInOut(D8)
35
50
lcd_d7 = digitalio.DigitalInOut(D12)
@@ -40,16 +55,22 @@ If you want to have on/off ``backlight`` functionality, you can also define your
40
55
41
56
You must also define the size of the CharLCD by specifying its ``lcd_columns`` and ``lcd_rows``:
42
57
58
+
.. code-block:: python
59
+
43
60
lcd_columns =16
44
61
lcd_rows =2
45
62
46
63
After you have set up your LCD, we can make the device by calling it
0 commit comments