Advanced I2C interfacing with Power HAT

I’m interfacing with the Power HAT directly via I2C and have noticed some strange behavior. For example, when I sent a command to get the input temperature (cd-01-01-00-00-53-46), half the time I get a correct response (example: dc-01-02-00-04-00-00-0b-ea-28-2d, temperature of 30.5 C). The other half of the time I get an incorrect response (example: 06-06-06-06-06-06-06-06-06-06-06). It’s pretty consistent that the first response is correct, and the second response is all 06’s. It alternates good, bad, good, bad, etc responses.

Looking through the power api code, I don’t see any kind of reset or clear command being sent to the HAT. What am I missing?

I should note that I do have a 10 ms sleep between the send and recv as does the python power api.

Hi @jacob.h.christensen,

For communication, SMBus and native I2C protocols are used jointly, so this will be the cause of the problem you mentioned. For best results, We recommend using the Power API methods. Thanks!