add timeout handling to the i2c read