rpi-displays

Python library to put text/chars to several rpi displays.


License
GPL-3.0-only
Install
pip install rpi-displays==0.1.2

Documentation

rpi-displays

https://badge.fury.io/py/rpi-displays.png https://travis-ci.org/deluge/rpi-displays.svg?branch=master https://readthedocs.org/projects/rpi-displays/badge/?version=latest

A Python 3 library to put text to several displays which are connected with a raspberry-pi.

Installation

Note

It requires the Adafruit-CharLCD package installed on your Raspberry Pi. A more detailed instruction is on Adafruit_Python_CharLCD

Hint

Before you go on, try to use the Adafruit_Python_CharLCD library with a normal user not root. It could be possible, that you get a IOError: [Errno 13] Permission denied. In that case, you have to add your user additional to the group i2c with:

sudo usermod -a -G i2c UserName

If you got the adafruit library up and running, you can simply install the latest stable package using the command

pip install rpi-displays

Usage

from time import sleep

from rpi_displays.sainsmart.displays import LCD2004

lcd = LCD2004()

lcd.display_string('********************', 1)
lcd.display_string('*   Have a nice    *', 2)
lcd.display_string('*        Day!      *', 3)
lcd.display_string('********************', 4)

sleep(5)
lcd.clear()
sleep(1)

lcd.switch_backlight(0)

rpi-displays can handle multiline messages:

from rpi_displays.sainsmart.displays import LCD2004

lcd = LCD2004()
lcd.text('This is a very long text that has more than 20 chars and look what happens', 1)

ToDos

It would be nice to get this package more functionality and not only for one thing. Have a look at the TODO.rst So feel free to fork this repo and let it grow!

Resources