Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- # from docs.beagleboard.org and the BeagleBone-Cookbook
- import time
- import smbus
- ms = 1000
- bus = smbus.SMBus(1)
- addr = 0x28
- while True:
- data = bus.read_byte_data(addr, 0)
- print("Gas per ______ " + str(data))
- time.sleep(ms/1000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement