Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8015

Python • Re: Unable to load / install RPLCD on RPI 5

$
0
0
In Control Centre enable i2c interface

Save attached code as lcd_001.py

Then in a terminal window...

gt64tr@gt64tr:~ $ python -m venv myfirstproject

gt64tr@gt64tr:~ $ source myfirstproject/bin/activate

(myfirstproject) gt64tr@gt64tr:~ $ pip3 install rpi_lcd

(myfirstproject) gt64tr@gt64tr:~ $ python lcd_001.py

Code:

from signal import signal,SIGTERM,SIGHUP,pausefrom rpi_lcd import LCDlcd = LCD()def safe_exit(signum,frame):    exit(1)signal(SIGTERM,safe_exit)signal(SIGHUP,safe_exit)lcd.text("Test Line 1",1)lcd.text("Test Line 2",2)

Statistics: Posted by gordon77 — Fri Dec 19, 2025 1:46 pm



Viewing all articles
Browse latest Browse all 8015

Trending Articles