Advertisement
Guest User

Untitled

a guest
Dec 20th, 2015
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import smbus
  4.  
  5. bus = smbus.SMBus(1)
  6. address = 0x39
  7.  
  8. dataLow = bus.read_byte_data(address, 0x8C)
  9. dataHigh = bus.read_byte_data(address, 0x8D)
  10.  
  11. output = (dataHigh * 256 + dataLow)
  12.  
  13. print output
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement