I am looking to connect an external battery to my Raspberry and know its level of charge. For that, I have to use a SMBus connection, so I can use the I2C ports of my Raspberry. But I can not recover the battery data.
My battery is on
I know that the first byte is a write byte and that the code is
0x16, the other two bytes are readbytes and the code to have the level of charge is
Could someone help me?
import smbus import time bus = smbus.SMBus(1) bus.write_byte(0x0b,1) x=bus.read_word_data(0x0b,0x0d) print x x=65535
Why this result?