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 example.py.
Installation
Download the LCDScreen.py file and place in your project. Add the following line to the top of your main project file:
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 }
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for lcdscreen-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d7ae562fd6626755f50c24dbb766a5b540976738f5153c4acc36c43d5c2f2ae |
|
MD5 | c4a5c8e0627d10d30d3f130db2b14d30 |
|
BLAKE2b-256 | 965d85df248e5d4ec5faf80c3516cb6b594d2b6b0ed0f7a739d0b3319910da40 |