Page 1 of 1

How to process i2c information

Posted: Fri Jun 18, 2021 12:50 pm
by ttadam
hello there,
I need some help with I2C, it is the first time when I need to use a device without a library.
The device is a fuel gauge. MAX17055. I am using micropython ofc.
i2c.readfrom(104, 0x06) this command should give me the battery level.
what I get is this (each line is a reading, takean after eachother):
b'\x13^o\x01\x16B'
b'\xc1@\x1a\x00\xb1\x11'
b'\n\x03\x85e\x8d('
b'\xdc\x12:\x00#&'
My guestion is how should I understood this data?
Looks off to me. Why do I get completly different data after each reading?
Thanks in advance! :)

Re: How to process i2c information

Posted: Sat Jun 19, 2021 1:19 pm
by karfas
ttadam wrote:
Fri Jun 18, 2021 12:50 pm
i2c.readfrom(104, 0x06) this command should give me the battery level.
Are you sure your i2c bus is working well ?
According to one of the arduino drivers, the i2c address of a MAX17055 is 0x36 (this is NOT 104 decimal), see https://github.com/AwotG/Arduino-MAX170 ... 5_Driver.h