<commit_before>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/dm/RPLCD.svg
    :target: https://pypi.python.org/pypi/RPLCD/
    :alt: PyPI Downloads
.. 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 2/3 Raspberry PI Character LCD library for the Hitachi HD44780
controller.

Tested with the 20x4 LCD that is sold for example by `adafruit.com
<http://www.adafruit.com/products/198>`_ or `mikroshop.ch
<http://mikroshop.ch/LED_LCD.html?gruppe=7&artikel=84>`__.

Also tested with a 16x2 LCD from `mikroshop.ch
<http://mikroshop.ch/LED_LCD.html?gruppe=7&artikel=15>`__ and
JHD162A.

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

No external dependencies (except the RPi.GPIO library, which comes preinstalled
on Raspbian) are needed to use this library.


Features
========

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

- Simple to use API
- Support for both 4 bit and 8 bit modes
- Support for custom characters
- Support for backlight control circuits
- Python 2/3 compatible
- Caching: Only write characters if they changed
- No external dependencies

Wishlist
--------

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

- I²C support

Wiring up Pi with LCD display
=============================

The following is the easiest way to wire up Pi with LCD display
in 4-bit mode using default values used in the library.

+------------+---------------------+---------------------------+
| HD44780    | Pi GPIO             | Comments                  |
| Pin Number | Pin Number (BOARD)  |                           |
+============+=====================+===========================+
|     1      | *Depends on module* | \* (See below)            |
+------------+---------------------+---------------------------+
|     2      |        6            | GND                       |
+------------+---------------------+---------------------------+
|     3      | *Depends on module* | \* (See below)            |
+------------+---------------------+---------------------------+
|     4      |        15           | Register Select           |
+------------+---------------------+---------------------------+
|     5      |        18 or 9      | R/W. Can be directly      |
|            |                     | attached to GND as well.  |
+------------+---------------------+---------------------------+
|     6      |        16           | Enable                    |
+------------+---------------------+---------------------------+
|     7-10   |   *Not connected*   | In 4-bit mode, we don't   |
|            |                     | connect them.             |
+------------+---------------------+---------------------------+
|     11     |        21           | D3                        |
+------------+---------------------+---------------------------+
|     12     |        22           | D2                        |
+------------+---------------------+---------------------------+
|     13     |        23           | D1                        |
+------------+---------------------+---------------------------+
|     14     |        24           | D0                        |
+------------+---------------------+---------------------------+
|     15     | *Depends on module* | \* (See below)            |
+------------+---------------------+---------------------------+
|     16     |        14           | GND                       |
+------------+---------------------+---------------------------+

\* After wiring up the data pins, you have to connect the voltage<commit_msg>Fix wiring pin for GND (fixes #25)<commit_after>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/dm/RPLCD.svg
    :target: https://pypi.python.org/pypi/RPLCD/
    :alt: PyPI Downloads
.. 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 2/3 Raspberry PI Character LCD library for the Hitachi HD44780
controller.

Tested with the 20x4 LCD that is sold for example by `adafruit.com
<http://www.adafruit.com/products/198>`_ or `mikroshop.ch
<http://mikroshop.ch/LED_LCD.html?gruppe=7&artikel=84>`__.

Also tested with a 16x2 LCD from `mikroshop.ch
<http://mikroshop.ch/LED_LCD.html?gruppe=7&artikel=15>`__ and
JHD162A.

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

No external dependencies (except the RPi.GPIO library, which comes preinstalled
on Raspbian) are needed to use this library.


Features
========

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

- Simple to use API
- Support for both 4 bit and 8 bit modes
- Support for custom characters
- Support for backlight control circuits
- Python 2/3 compatible
- Caching: Only write characters if they changed
- No external dependencies

Wishlist
--------

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

- I²C support

Wiring up Pi with LCD display
=============================

The following is the easiest way to wire up Pi with LCD display
in 4-bit mode using default values used in the library.

+------------+---------------------+---------------------------+
| HD44780    | Pi GPIO             | Comments                  |
| Pin Number | Pin Number (BOARD)  |                           |
+============+=====================+===========================+
|     1      |        6            | GND                       |
+------------+---------------------+---------------------------+
|     2      | *Depends on module* | \* (See below)            |
+------------+---------------------+---------------------------+
|     3      | *Depends on module* | \* (See below)            |
+------------+---------------------+---------------------------+
|     4      |        15           | Register Select           |
+------------+---------------------+---------------------------+
|     5      |        18 or 9      | R/W. Can be directly      |
|            |                     | attached to GND as well.  |
+------------+---------------------+---------------------------+
|     6      |        16           | Enable                    |
+------------+---------------------+---------------------------+
|     7-10   |   *Not connected*   | In 4-bit mode, we don't   |
|            |                     | connect them.             |
+------------+---------------------+---------------------------+
|     11     |        21           | D3                        |
+------------+---------------------+---------------------------+
|     12     |        22           | D2                        |
+------------+---------------------+---------------------------+
|     13     |        23           | D1                        |
+------------+---------------------+---------------------------+
|     14     |        24           | D0                        |
+------------+---------------------+---------------------------+
|     15     | *Depends on module* | \* (See below)            |
+------------+---------------------+---------------------------+
|     16     |        14           | GND                       |
+------------+---------------------+---------------------------+

\* After wiring up the data pins, you have to connect the voltage
{'fraction_non_alphanumeric': 0.3175026062782347, 'fraction_numerical': 0.018765203289702305, 'mean_word_length': 1.053269916765755, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 28, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2785930', 'n_tokens_mistral': 2448, 'n_tokens_neox': 2204, 'n_words': 593}