I2C sensor


#1

Hi,

I’m trying to develop a Python driver for the HiTechnic IRSeeker.
Attached is a first version, and a snapshot of the output. I works sometimes, yet after several trials with the BrickPiRx error -2 (timeout). But other times, it fails at the 3rd trial with error -6 (number of bytes received less than specified).

I have tried different I2C_SPEED values with no success. Any help is appreciated.

Thanks in advance,

Enric


#2

Attached is the code in image format (not allowed as source).