Skip to content

Instantly share code, notes, and snippets.

View BertLindeman's full-sized avatar

Bert BertLindeman

  • Netherlands, Zuid Holland
View GitHub Profile
import smbus
import time
for bus in range(3, 7):
curport = (bus - 2)
print "bus: %2d port: %2d " % (bus, curport)
try:
i2c = smbus.SMBus(bus)
print " Input port %d:" % (bus - 2)
for addr in range(0x01, 0x80, 2):