Skip to main content

Introduction

Documentation Status Discord Build Status Code Style: Ruff

This library is compatible with standard Character LCDs such as:

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-charlcd

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-charlcd

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-charlcd

Dependencies

This driver depends on:

I2C & SPI displays also depend on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Usage Example

The Character_LCD class interfaces a predefined Character LCD display with CircuitPython.

import board
import digitalio
import adafruit_character_lcd.character_lcd as character_lcd

You must define the data pins (RS, EN, D4, D5, D6, D7) in your code before using the Character_LCD class. 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. The following is an example setup.

lcd_rs = digitalio.DigitalInOut(board.D7)
lcd_en = digitalio.DigitalInOut(board.D8)
lcd_d7 = digitalio.DigitalInOut(board.D12)
lcd_d6 = digitalio.DigitalInOut(board.D11)
lcd_d5 = digitalio.DigitalInOut(board.D10)
lcd_d4 = digitalio.DigitalInOut(board.D9)
lcd_backlight = digitalio.DigitalInOut(board.D13)

You must also define the size of the CharLCD by specifying its lcd_columns and lcd_rows:

lcd_columns = 16
lcd_rows = 2

After you have set up your LCD, we can make the device by calling it

lcd = character_lcd.Character_LCD_Mono(lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7, lcd_columns, lcd_rows, lcd_backlight)

To verify that your pins are correct, print a hello message to the CharLCD:

lcd.message = "Hello\nCircuitPython"

Custom character example with create_char() is provided within /examples/

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Release files for adafruit-circuitpython-charlcd 3.5.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adafruit-circuitpython-charlcd 3.5.7
File Size Uploaded
adafruit_circuitpython_charlcd-3.5.7.tar.gz 34.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for adafruit-circuitpython-charlcd 3.5.7
File Interpreter ABI Platform
adafruit_circuitpython_charlcd-3.5.7-py3-none-any.whl Python 3 none any Details

Total release size: 48.8 kB

Release files / adafruit_circuitpython_charlcd-3.5.7.tar.gz

Download URL adafruit_circuitpython_charlcd-3.5.7.tar.gz
Size 34.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f81224258fe36c558ebd5811c89ba1d4a8fc0ff723e48046b4178aee6f177d12
BLAKE2b-256 checksum
How to use checksums
22e529697595cca8c696cbd3447b25bb70a44fcaad54e4caefb8edcc4ed3dcbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / adafruit_circuitpython_charlcd-3.5.7-py3-none-any.whl

Download URL adafruit_circuitpython_charlcd-3.5.7-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5395bce5b48f5a53e7de6afb4c56db15c0629f784a07c91cd021314c911385f5
BLAKE2b-256 checksum
How to use checksums
bfcec7e7e0e4bd48a5aa30b7904d69bbdeb6245a487f36c654d43b54af7b5519
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

3.5.7 This release

2 release files

3.5.6

2 release files

3.5.5

2 release files

3.5.4

2 release files

3.5.3

2 release files

3.5.2

2 release files

3.5.1

2 release files

3.5.0

2 release files

3.4.12

2 release files

3.4.9

2 release files

3.4.8

2 release files

3.4.7

2 release files

3.4.6

2 release files

3.4.5

2 release files

3.4.4

2 release files

3.4.3

2 release files

3.4.2

2 release files

3.4.1

2 release files

3.4.0

1 release file

3.3.15

1 release file

3.3.14

1 release file

3.3.13

1 release file

3.3.12

1 release file

3.3.11

1 release file

3.3.10

1 release file

3.3.9

1 release file

3.3.8

1 release file

3.3.7

1 release file

3.3.6

1 release file

3.3.5

1 release file

3.3.4

1 release file

3.3.3

1 release file

3.3.2

1 release file

3.3.1

1 release file

3.3.0

1 release file

3.2.2

1 release file

3.2.1

1 release file

3.2.0

1 release file

3.1.2

1 release file

3.1.1

1 release file

3.1.0

1 release file

3.0.3

1 release file

3.0.2

1 release file

3.0.1

1 release file

3.0.0

1 release file

2.4.1

1 release file

2.4.0

1 release file

2.3.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page