RPLCD


NameRPLCD JSON
Version 1.3.1 PyPI version JSON
download
home_pagehttps://github.com/dbrgn/RPLCD
SummaryA Raspberry Pi LCD library for the widely used Hitachi HD44780 controller.
upload_time2023-03-24 23:49:56
maintainer
docs_urlNone
authorDanilo Bargen
requires_python
licenseMIT
keywords raspberry raspberry pi lcd liquid crystal hitachi hd44780
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            RPLCD
#####

.. image:: https://img.shields.io/travis/dbrgn/RPLCD/master.svg
    :target: https://travis-ci.org/dbrgn/RPLCD
    :alt: Build Status
.. image:: https://img.shields.io/pypi/v/RPLCD.svg
    :target: https://pypi.python.org/pypi/RPLCD/
    :alt: PyPI Version
.. image:: https://img.shields.io/pypi/wheel/RPLCD.svg
    :target: https://pypi.python.org/pypi/RPLCD/
    :alt: PyPI Wheel
.. image:: https://img.shields.io/pypi/pyversions/RPLCD.svg
    :target: https://pypi.python.org/pypi/RPLCD/
    :alt: PyPI Python Versions
.. image:: https://img.shields.io/badge/dependencies-0-blue.svg
    :target: https://pypi.python.org/pypi/RPLCD/
    :alt: Dependencies
.. image:: https://img.shields.io/pypi/l/RPLCD.svg
    :target: https://pypi.python.org/pypi/RPLCD/
    :alt: License

A Python 3/2 Raspberry PI Character LCD library for the Hitachi HD44780
controller. It supports both GPIO (parallel) mode as well as boards with an I²C
port expander (e.g. the PCF8574 or the MCP23008).

This library is inspired by Adafruit Industries' CharLCD_ library as well as by
Arduino's LiquidCrystal_ library.

For GPIO mode, no external dependencies (except the ``RPi.GPIO`` library, which
comes preinstalled on Raspbian) are needed to use this library. If you want to
control LCDs via I²C, then you also need the ``python-smbus`` or ``smbus2`` library. If you
want to control the LCD with ``pigpio``, you have to install the pigpio_ library.

If you're trying to get started with RPLCD, you should probably `read the docs
<#documentation>`__ :)

.. image:: https://raw.github.com/dbrgn/RPLCD/master/photo-i2c.jpg
    :alt: Photo of 20x4 LCD in action


Setup
=====

You can install RPLCD directly from `PyPI
<https://pypi.python.org/pypi/RPLCD/>`_ using pip::

    $ sudo pip install RPLCD

If you want to use I²C, you also need either the smbus or `smbus2 <https://pypi.org/project/smbus2/>`_ library::

    $ sudo apt install python-smbus
    or
    $ sudo pip install smbus2

RPLCD will first try to use smbus if available and if not, fall back to smbus2.

You can also install the library manually without pip. Either just copy the
scripts to your working directory and import them, or download the repository
and run ``python setup.py install`` to install it into your Python package
directory.


Features
========

Implemented
-----------

- Simple to use API
- Support for both 4 bit and 8 bit modes
- Support for both parallel (GPIO) and I²C connection
- Support for custom characters
- Support for backlight control circuits
- Built-in support for `A00`, `A02` (standard HD44780)
  or `ST0B` (see ST7066_, page 11) character tables
- Python 2/3 compatible
- Caching: Only write characters if they changed
- No external dependencies (except `RPi.GPIO`, and `python-smbus` or `smbus2` if you need
  I²C support)

Wishlist
--------

These things may get implemented in the future, depending on my free time and
motivation:

- MicroPython port

Supported I²C Port Expanders
----------------------------

- PCF8574 (used by a lot of I²C LCD adapters on Ali Express)
- MCP23008 (used in Adafruit I²C LCD backpack)
- MCP23017


Documentation
=============

- Stable (released on PyPI): http://rplcd.readthedocs.io/en/stable/
- Latest (current master): http://rplcd.readthedocs.io/en/latest/

Testing
=======

Interactive Test Script
-----------------------

To test your LCD, please run the ``rplcd-tests`` script with the ``testsuite``
target.

Unit Tests
----------

There are also unit tests. First, install dependencies:

    pip install -U -r requirements-dev.txt

Then run the tests:

    py.test -v


Coding Guidelines
=================

`PEP8 <http://www.python.org/dev/peps/pep-0008/>`__ via `flake8
<https://pypi.python.org/pypi/flake8>`_ with ``max-line-width`` set to 99 and
``E126-E128,C901`` ignored::

    flake8 --max-line-length=99 --ignore=E126,E127,E128,C901 RPLCD/lcd.py


About HD44780
=============

The HD44780 LCD controller is a controller chip for driving alphanumeric LCD displays. Though it's
not manufactured anymore there are a lot of compatible chips / clones of it e.g. the ST7066 or the
KS0066. Displays sold with 'HD44780' in its name today typically are built with one of those 
clones, though they all look the same from the outside most of the time (like in the image at the 
start of this README). 


Resources
=========

- TC2004A-01 Data Sheet: http://www.adafruit.com/datasheets/TC2004A-01.pdf
- HD44780U Data Sheet: http://www.adafruit.com/datasheets/HD44780.pdf
- ST7066 Data Sheet: https://www.sparkfun.com/datasheets/LCD/st7066.pdf


License
=======

This code is licensed under the MIT license, see the `LICENSE file
<https://github.com/dbrgn/RPLCD/blob/master/LICENSE>`_ or `tldrlegal
<http://www.tldrlegal.com/license/mit-license>`_ for more information. 


.. _charlcd: https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/tree/master/Adafruit_CharLCD
.. _liquidcrystal: http://arduino.cc/en/Reference/LiquidCrystal
.. _pigpio: http://abyz.me.uk/rpi/pigpio/
.. _st7066: https://www.sparkfun.com/datasheets/LCD/st7066.pdf

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dbrgn/RPLCD",
    "name": "RPLCD",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "raspberry,raspberry pi,lcd,liquid crystal,hitachi,hd44780",
    "author": "Danilo Bargen",
    "author_email": "mail@dbrgn.ch",
    "download_url": "https://files.pythonhosted.org/packages/7f/f7/9860cc59f12fcb80ced36b45ce05dd321f381b8ff3d00b79ad48bcbd96b9/RPLCD-1.3.1.tar.gz",
    "platform": "any",
    "description": "RPLCD\n#####\n\n.. image:: https://img.shields.io/travis/dbrgn/RPLCD/master.svg\n    :target: https://travis-ci.org/dbrgn/RPLCD\n    :alt: Build Status\n.. image:: https://img.shields.io/pypi/v/RPLCD.svg\n    :target: https://pypi.python.org/pypi/RPLCD/\n    :alt: PyPI Version\n.. image:: https://img.shields.io/pypi/wheel/RPLCD.svg\n    :target: https://pypi.python.org/pypi/RPLCD/\n    :alt: PyPI Wheel\n.. image:: https://img.shields.io/pypi/pyversions/RPLCD.svg\n    :target: https://pypi.python.org/pypi/RPLCD/\n    :alt: PyPI Python Versions\n.. image:: https://img.shields.io/badge/dependencies-0-blue.svg\n    :target: https://pypi.python.org/pypi/RPLCD/\n    :alt: Dependencies\n.. image:: https://img.shields.io/pypi/l/RPLCD.svg\n    :target: https://pypi.python.org/pypi/RPLCD/\n    :alt: License\n\nA Python 3/2 Raspberry PI Character LCD library for the Hitachi HD44780\ncontroller. It supports both GPIO (parallel) mode as well as boards with an I\u00b2C\nport expander (e.g. the PCF8574 or the MCP23008).\n\nThis library is inspired by Adafruit Industries' CharLCD_ library as well as by\nArduino's LiquidCrystal_ library.\n\nFor GPIO mode, no external dependencies (except the ``RPi.GPIO`` library, which\ncomes preinstalled on Raspbian) are needed to use this library. If you want to\ncontrol LCDs via I\u00b2C, then you also need the ``python-smbus`` or ``smbus2`` library. If you\nwant to control the LCD with ``pigpio``, you have to install the pigpio_ library.\n\nIf you're trying to get started with RPLCD, you should probably `read the docs\n<#documentation>`__ :)\n\n.. image:: https://raw.github.com/dbrgn/RPLCD/master/photo-i2c.jpg\n    :alt: Photo of 20x4 LCD in action\n\n\nSetup\n=====\n\nYou can install RPLCD directly from `PyPI\n<https://pypi.python.org/pypi/RPLCD/>`_ using pip::\n\n    $ sudo pip install RPLCD\n\nIf you want to use I\u00b2C, you also need either the smbus or `smbus2 <https://pypi.org/project/smbus2/>`_ library::\n\n    $ sudo apt install python-smbus\n    or\n    $ sudo pip install smbus2\n\nRPLCD will first try to use smbus if available and if not, fall back to smbus2.\n\nYou can also install the library manually without pip. Either just copy the\nscripts to your working directory and import them, or download the repository\nand run ``python setup.py install`` to install it into your Python package\ndirectory.\n\n\nFeatures\n========\n\nImplemented\n-----------\n\n- Simple to use API\n- Support for both 4 bit and 8 bit modes\n- Support for both parallel (GPIO) and I\u00b2C connection\n- Support for custom characters\n- Support for backlight control circuits\n- Built-in support for `A00`, `A02` (standard HD44780)\n  or `ST0B` (see ST7066_, page 11) character tables\n- Python 2/3 compatible\n- Caching: Only write characters if they changed\n- No external dependencies (except `RPi.GPIO`, and `python-smbus` or `smbus2` if you need\n  I\u00b2C support)\n\nWishlist\n--------\n\nThese things may get implemented in the future, depending on my free time and\nmotivation:\n\n- MicroPython port\n\nSupported I\u00b2C Port Expanders\n----------------------------\n\n- PCF8574 (used by a lot of I\u00b2C LCD adapters on Ali Express)\n- MCP23008 (used in Adafruit I\u00b2C LCD backpack)\n- MCP23017\n\n\nDocumentation\n=============\n\n- Stable (released on PyPI): http://rplcd.readthedocs.io/en/stable/\n- Latest (current master): http://rplcd.readthedocs.io/en/latest/\n\nTesting\n=======\n\nInteractive Test Script\n-----------------------\n\nTo test your LCD, please run the ``rplcd-tests`` script with the ``testsuite``\ntarget.\n\nUnit Tests\n----------\n\nThere are also unit tests. First, install dependencies:\n\n    pip install -U -r requirements-dev.txt\n\nThen run the tests:\n\n    py.test -v\n\n\nCoding Guidelines\n=================\n\n`PEP8 <http://www.python.org/dev/peps/pep-0008/>`__ via `flake8\n<https://pypi.python.org/pypi/flake8>`_ with ``max-line-width`` set to 99 and\n``E126-E128,C901`` ignored::\n\n    flake8 --max-line-length=99 --ignore=E126,E127,E128,C901 RPLCD/lcd.py\n\n\nAbout HD44780\n=============\n\nThe HD44780 LCD controller is a controller chip for driving alphanumeric LCD displays. Though it's\nnot manufactured anymore there are a lot of compatible chips / clones of it e.g. the ST7066 or the\nKS0066. Displays sold with 'HD44780' in its name today typically are built with one of those \nclones, though they all look the same from the outside most of the time (like in the image at the \nstart of this README). \n\n\nResources\n=========\n\n- TC2004A-01 Data Sheet: http://www.adafruit.com/datasheets/TC2004A-01.pdf\n- HD44780U Data Sheet: http://www.adafruit.com/datasheets/HD44780.pdf\n- ST7066 Data Sheet: https://www.sparkfun.com/datasheets/LCD/st7066.pdf\n\n\nLicense\n=======\n\nThis code is licensed under the MIT license, see the `LICENSE file\n<https://github.com/dbrgn/RPLCD/blob/master/LICENSE>`_ or `tldrlegal\n<http://www.tldrlegal.com/license/mit-license>`_ for more information. \n\n\n.. _charlcd: https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/tree/master/Adafruit_CharLCD\n.. _liquidcrystal: http://arduino.cc/en/Reference/LiquidCrystal\n.. _pigpio: http://abyz.me.uk/rpi/pigpio/\n.. _st7066: https://www.sparkfun.com/datasheets/LCD/st7066.pdf\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Raspberry Pi LCD library for the widely used Hitachi HD44780 controller.",
    "version": "1.3.1",
    "split_keywords": [
        "raspberry",
        "raspberry pi",
        "lcd",
        "liquid crystal",
        "hitachi",
        "hd44780"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a933af205c7b6a1210af76957924070a6b0da909c8f1de755d5d321548274dde",
                "md5": "be485fa6e5a4531aaa161ce33149ba83",
                "sha256": "04920b645b4fea79addebbc9c8368971a5af307ca70df3f0b1842d3de2e01040"
            },
            "downloads": -1,
            "filename": "RPLCD-1.3.1-py2.py3-none-any.whl",
            "has_sig": true,
            "md5_digest": "be485fa6e5a4531aaa161ce33149ba83",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 49256,
            "upload_time": "2023-03-24T23:49:52",
            "upload_time_iso_8601": "2023-03-24T23:49:52.532139Z",
            "url": "https://files.pythonhosted.org/packages/a9/33/af205c7b6a1210af76957924070a6b0da909c8f1de755d5d321548274dde/RPLCD-1.3.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ff79860cc59f12fcb80ced36b45ce05dd321f381b8ff3d00b79ad48bcbd96b9",
                "md5": "40c5ceb170cdcfa36ebcb6263ea10c09",
                "sha256": "b99d293f358af1c0525fcfeabdc6466049e555db569ffbca3f217591fc14e4f9"
            },
            "downloads": -1,
            "filename": "RPLCD-1.3.1.tar.gz",
            "has_sig": true,
            "md5_digest": "40c5ceb170cdcfa36ebcb6263ea10c09",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 36577,
            "upload_time": "2023-03-24T23:49:56",
            "upload_time_iso_8601": "2023-03-24T23:49:56.504172Z",
            "url": "https://files.pythonhosted.org/packages/7f/f7/9860cc59f12fcb80ced36b45ce05dd321f381b8ff3d00b79ad48bcbd96b9/RPLCD-1.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-24 23:49:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "dbrgn",
    "github_project": "RPLCD",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "rplcd"
}
        
Elapsed time: 0.07523s