This commit is contained in:
fancontrol 2026-09-24 21:45:01 +02:00
parent 2da561ebbb
commit de1be89c01
9 changed files with 399 additions and 0 deletions

View file

@ -0,0 +1,31 @@
# LCD-1602-I2C
A simple Python library for displaying text on the LCD 1602 w/ I2C. Implemented on the **Raspberry Pi** 3 B.
## Simple Example
```python
import time
from LCD import LCD
lcd = LCD() # params available for rPi revision, I2C Address, and backlight on/off
# lcd = LCD(2, 0x3F, True)
lcd.message("Hello World!", 1) # display 'Hello World!' on line 1 of LCD
time.sleep(5) # wait 5 seconds
lcd.clear() # clear LCD display
```
## Install/Setup
```
sudo apt-get install i2c-tools
sudo apt-get install python-smbus
```
#### Enable I2C
`sudo raspi-config`
Advanced Options > I2C > Enable
#### Determine I2C Address
`i2cdetect -y 0`
default is 0x3F