commit 0f1fa3248bc8276e2ce8d9912a0e5eb9f7210b8f
parent 44b53f559fe88bd9d567f547a96059444e645401
Author: rbckman <rob@tarina.org>
Date: Wed, 2 Dec 2020 19:18:33 +0000
modprobe i2c buttons
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/tarina.py b/tarina.py
@@ -43,8 +43,10 @@ print('running debian ' + debianversion)
#I2CBUTTONS
try:
if debianversion == "stretch":
+ os.system('sudo modprobe i2c-dev')
bus = smbus.SMBus(3) # Rev 2 Pi uses 1
else:
+ os.system('sudo modprobe i2c-dev')
bus = smbus.SMBus(11) # Rev 2 Pi uses 1
DEVICE = 0x20 # Device address (A0-A2)
IODIRB = 0x0d # Pin pullups B-side