项目作者: m-rtijn

项目描述 :
A Python module to handle the I2C communication between a Raspberry Pi and an i2c backpack for a 16x2 char LCD.
高级语言: Python
项目地址: git://github.com/m-rtijn/lcd-i2c.git
创建时间: 2016-06-29T07:46:32Z
项目社区:https://github.com/m-rtijn/lcd-i2c

开源协议:GNU General Public License v3.0

下载


lcd-i2c

A Python module to handle the I2C communication between a Raspberry Pi and an
i2c backpack for a 16x2 (or other size) char LCD.
This module supports screens with up to 4 lines. There’s no maximum width.

You can simply import the lcd_i2c as shown in the example and easily print to the
display.

Installation

To install this module, run the following commands:

  1. python setup.py build
  2. python setup.py install

The second command might need to run as superuser or using sudo.

Usage

After creating a lcd_i2c object, you can use the following methods to write to the LCD:

  1. println(string, line) # Print only on one line. All characters which won't fit are ignored
  2. print(string, scroll_time = 5) # Print a string. If the string is too big for the
  3. # lcd it will scroll through all the text.
  4. clear() # Remove all text from the screen

License

The code in this project is licensed under the GNU GPL v3, or (at your option) any later version.