Custom I2C sensor read issues

I am the programmer of the FTC team LITBOT #24500. I have been trying to write an I2C driver for the ISL29125 color sensor. Of course, I wouldn’t have been able to do it from scratch, so I followed the I2c sensor driver tutorial (writing an I2c driver on github, can’t add link due to two links restriction for new members) where possible. Currently I am at a stage where I am trying to read data (currently the device ID, register 0x00) from the sensor, but I can’t seem to get any data out of the sensor (LynxI2cDeviceSynch: readStatusQuery: cbExpected=1 cbRead=0). I have checked that the register address is correct and the size of the read should be appropriate too. The hardware side (sensor, connection) shouldn’t also be a problem, since I got the same result with two sensors. The configuration also seems to be correct. What could be the problem? This is the datasheet for the sensor: https://www.renesas.com/us/en/document/dst/isl29125-datasheet I have also attached our code and logs:

https://drive.google.com/drive/folders/1Teyd3hsMmW2QOokI5JjAYgy-D6t-nT9d?usp=sharing

I would really appreciate any help, as I have been stuck on this for like a week.

Also, I saw that setOptimalReadWindow could be the problem. Is that the case?

I haven’t done a deep dive on your code but if you have access to a logic analyzer or oscilloscope, they are of invaluable utility when troubleshooting things like this.

The entire concept of read windows does not apply to the REV control system at all. It only ever mattered for Modern Robotics, which is no longer legal for competition.

Also make certain you don’t have the data and clock wires swapped.

I actually later figured out that it was a wiring issue afterall, thank you for the help tho!