Skip to content

Commit ab50bc1

Browse files
authored
Merge pull request #56 from ShadowLight8/switch-to-lgpio
Update fpp_install.sh to use python3-rpi-lgpio Update basicI2C.py to prevent a raspberry pi from using i2c-2 if it exists
2 parents c1c42d6 + 2528fc6 commit ab50bc1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

basicI2C.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class basicI2C():
1313
def __init__(self, address, bus=1):
1414
self.address = address
1515
# Bus 1 is Modern RPis, Bus 2 is BBB, Bus 0 is older RPis
16-
if os.path.exists('/dev/i2c-2') or os.path.exists('/sys/class/i2c-2'):
16+
# uEnv.txt indicates a BBB, so 2 would be ok. On single HDMI port RPi's i2c-2 can show up, but isn't what should be used
17+
if os.path.exists('/boot/uEnv.txt') and (os.path.exists('/dev/i2c-2') or os.path.exists('/sys/class/i2c-2')):
1718
bus = 2
1819
elif os.path.exists('/dev/i2c-0') or os.path.exists('/sys/class/i2c-0'):
1920
bus = 0

scripts/fpp_install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ echo -e "\nInstalling python3-smbus..."
77
sudo apt-get install -y python3-smbus
88

99
if test -f /boot/config.txt; then
10-
echo -e "\nInstalling RPi.GPIO..."
11-
sudo apt-get install -y python3-rpi.gpio
10+
echo -e "\nInstalling python3-rpi-lgpio..."
11+
sudo apt-get install -y python3-rpi-lgpio
1212
fi
1313

1414
echo -e "\nRestarting FPP..."

0 commit comments

Comments
 (0)