Skip to main content

A class to write to a LCD Screen using a raspberry pi

Project description

This class makes it easy to write messages to your LCD screen via your Raspberry Pi.

For a working example of the class, see


Install from pip

pip install lcdscreen

From there you can use it as you wish!

from lcdscreen import LCDScreen

Next, initialise the class, passing in the parameters as required:

lcd = LCDScreen({
        'pin_rs': 25,
        'pin_e': 24,
        'pins_db': [23, 17, 27, 22],
        'backlight': 18,
        'dimensions': [20, 4]

The defaults are below. If you don’t wish to change anything then you can initilise without passing anything in:

config_preset = {
        'pin_rs': 25, # The input of the RS pin
        'pin_e': 24, # The input of the E pin
        'pins_db': [23, 17, 27, 22], # The input of the DB pins
        'backlight': 18, # The input of the Backlight pin
        'dimensions': [20, 4], # How big your screen is [width, height]
        'delay': 3, # The default delay time
        'spacer': ' ' # The default spacer character
        'truncate': '..' # What to add to a truncated string if the message is longer than the screen width

Once initialised, it’s quite easy to operate. The class is well documented and the exmaple file shows how to use it



Turn the backlight on:


And turn it off:



lcd.message('Your message')


lcd.delay() # Delay by default delay time (set in config)
lcd.delay(5) # Delay by 5 seconds
lcd.delay_clear() # Wait default delay time then clear the screen

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for lcdscreen, version 1.2.1
Filename, size File type Python version Upload date Hashes
Filename, size lcdscreen-1.2.1-py2.py3-none-any.whl (6.1 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size lcdscreen-1.2.1.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page