This class makes it easy to write messages to your LCD screen via your Raspberry Pi.
For a working example of the class, see example.py.
Installation
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
Usage
Backlight
Turn the backlight on:
lcd.backlight('on')
And turn it off:
lcd.backlight('off')
Message
lcd.message('Your message')
Delay
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
Metadata
Release files for lcdscreen 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lcdscreen-1.2.1.tar.gz | 4.3 kB | Without provenance | Details for lcdscreen-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lcdscreen-1.2.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for lcdscreen-1.2.1-py2.py3-none-any.whl |
Total release size: 10.4 kB
Release files / lcdscreen-1.2.1.tar.gz
| Download URL | lcdscreen-1.2.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a912487be2e36bc352c5e2462b149a6a7c89bc271f398632143555a9dc85d04
|
|
BLAKE2b-256 checksum How to use checksums |
f393aa22c4040cc034b9bf35333bb83807d89820515d0f44321d3236e565d2b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / lcdscreen-1.2.1-py2.py3-none-any.whl
| Download URL | lcdscreen-1.2.1-py2.py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
fdf9d1a546ce60fa400e706858f2a246f0c68c084a4da3205729875a0aed58b5
|
|
BLAKE2b-256 checksum How to use checksums |
78c55f6c9949531471282b48ec5fdbee0aa3bf9c42931d37ec1426846edb0de1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for lcdscreen 1.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.