This repository contains all of the code for interfacing with a 16x2 Character I2C LCD Display. This accompanies my YouTube tutorial here: https://www.youtube.com/watch?v=fR5XhHYzUK0
Installation and configuration script (setup.sh) attempts to install both python-smbus and python3-smbus and then checks for which version was installed to inform users about whether to use ptyhon or python3 when interfacing with the LCD via a demo_*.py file or any custom Python file that makes use of the LCD driver (drivers/i2c_dev.py). This is the fourth alternative mentioned in #45 .
Other changes were made to improve readability and to make it easier to edit setup.sh the future, in case something changes. Examples of such changes include moving CONFIG variables to the top and the addition of a message function.
I also took this opportunity to fix a permission issue with a few of the more recent demo_*.py files, namely the permission to execute (+x) was missing in some demos.
As usual, the changes in this PR were tested with my RPi 3 running buster still. I cannot test RPi 4 on bullseye but none of the changes introduce anything new, except for making python3-smbus part of the installed packages.
Fixes #45, #44, #43, #42, #41:
setup.sh
) attempts to install bothpython-smbus
andpython3-smbus
and then checks for which version was installed to inform users about whether to useptyhon
orpython3
when interfacing with the LCD via ademo_*.py
file or any custom Python file that makes use of the LCD driver (drivers/i2c_dev.py
). This is the fourth alternative mentioned in #45 .Other changes were made to improve readability and to make it easier to edit
setup.sh
the future, in case something changes. Examples of such changes include movingCONFIG
variables to the top and the addition of amessage
function.I also took this opportunity to fix a permission issue with a few of the more recent
demo_*.py
files, namely the permission to execute (+x
) was missing in some demos.As usual, the changes in this PR were tested with my RPi 3 running
buster
still. I cannot test RPi 4 onbullseye
but none of the changes introduce anything new, except for makingpython3-smbus
part of the installed packages.