Hi -
We are working on a custom driver for the TCT40 Ultrasonic Sensor using the FTC SDK’s I2c interface. We actually got it working, but:
- It never reads more than 200 or so (shouldn’t it go to 400?)
- After a while it locks and we get an orange message saying the device can’t be found that persists until we power cycle the control hub. I don’t have the exact error on me, but it appears to be a no acknowledge sort of error, which seems odd since we are just reading a register.
We are a bit frustrated by the lack of documentation. From the Arduino code, we pieced together that we need to read 2 bytes at register 0x01. But that code has a return value that implies the length of data that’s returned, which implies that the data we receive may be dynamic and maybe that’s part of our problem. Or maybe not. But the fact that the value never exceeds 200 makes me wonder if we are only getting one byte (or if my java conversion of the arduino bitwise code is wrong - can I use bytearraytoshort?).
Finally, we are going to test using readWindow with repeated reads with the hope that this helps, but any input would be much appreciated.