driver for LCD1602/2002/2004 with I2C adapter, for Raspberry Pi or other device
Project description
Python I2CLCD module
Python I2CLCD module for LCD1602/2002/2004 screen with I2C adapter
Can be used on embedded devices like the Raspberry Pi
Features
- Implemented most of the built-in instructions of LCD1602/2002/2004
- Support for custom characters
- Support backlight settings
- Support 'Cursor or Display Shift' instructions
- Hints for each method
Quick start
import i2clcd
lcd = i2clcd.i2clcd(i2c_bus=1, i2c_addr=0x27, lcd_width=16)
lcd.init()
# fill a line by the text
lcd.print_line('hello', line=0)
lcd.print_line('world!', line=1, align='RIGHT')
# print text at the current cursor position
lcd.move_cursor(1, 0)
lcd.print('the')
# custom character
char_celsius = (0x10, 0x06, 0x09, 0x08, 0x08, 0x09, 0x06, 0x00)
lcd.write_CGRAM(char_celsius, 0)
lcd.move_cursor(0, 6)
lcd.print(b'CGRAM: ' + i2clcd.CGRAM_CHR[0])
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
i2clcd-0.0.1.tar.gz
(3.6 kB
view hashes)
Built Distribution
i2clcd-0.0.1-py3-none-any.whl
(4.7 kB
view hashes)