Thank you for the answers! The device address is 0x55. What I had to do is read 2 bytes, starting from register 0x04 (so it will read 0x04 and 0x05 register) to get the voltage value.
Now I'm trying to set the Nominal Capacity in the fuel gauge BQ27441. I am following the steps written on page 14 of the datasheet (http://www.ti.com/lit/ug/sluuac9a/sluuac9a.pdf
). I wrote a python code as you can see below, trying to set the Design Capacity to 1200mAh, but when I try to write on the address 0x60, I've got the following error message
IOError: [Errno 121] Remote I/O error"
I am able to read 0x60; just when I try to write on it that I have this problem and I've got that message. Does anyone know what might be causing this error?
Code: Select all
address = 0x55
print "Full Available Capacity is",full_cap, 'mA'
#Trying to write the nominal capacity
bus.write_byte_data(address,0x4a,0x04) #writing new capacity
bus.write_byte_data(address,0x4b,0xb0) #writing new capacity
bus.write_byte_data(address,0x60,0x1f) #trying to write on BlockDataChecksum()
f=bus.read_i2c_block_data(address,0x3c,2) #address for design capacity