Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import smbus
- bus = smbus.SMBus(1)
- def list_devices():
- devices = []
- for device in range(128):
- try:
- bus.read_byte(device)
- devices.append(device)
- print(hex(device))
- except:
- pass
- return devices
Advertisement
Add Comment
Please, Sign In to add comment