Thanks Chrischi and Hugo for your prompt response. I really appreciate it.
When I first power on the sensor, I can get few readings (sometimes upto 10-15 of them) which appear to be correct. Then I start getting the timeout on write and of course no read. I tried waking up 10s and 2 mins, but nothing changes.
I have 10K pull up resistor (could not find 4.7k right now) on both SCL and SDA. With these few readings, I’m pretty sure the connections and addresses are correct. Clock speed is 100K. I’ using April breakout board and 8 V power supply to the sensor and VIN pin of the board.
I’m using
hardware.i2c89.configure(CLOCK_SPEED_100_KHZ);
i2c12 also has same issue. I have no problem using the sensor with Arduino. I have put 4.7k pullup on both SDA and SCL. I have checked their docs. The write and read commands are all it needs to get the data.
I’m getting data for sometime, around 10-15 readings after I power cycle the sensor and then sensor stops taking commands.
I have no idea if I need more tweaks on read and write on the bus. Or perhaps bit bang?