Hi all.
I have xiao esp32c3 and want to connect to bno085(edit: from adafruit, shouldn't require pullups) via I2C. Both parts are working as I can do bluetooth connection with xiao and when I connect the bno sensor to arduino board, it works. When I connect them together, I am not able to establish a connection. In rare occasions it connects and then I can do the readings without any problem, even under a lot of movement. So there isnt a problem with the wiring.
I get this error message:
I2C hardware timeout detected
probe device timeout. Please check if xfer_timeout_ms and pull-ups are correctly set up
I tried
Wire.setClock(40000);
and a lot of other stuff recomended by chatgpt and what I thought would work. For example changing and specifying adresses but, I can run the same code without problem when using arduino mega.
Any ideas how to increase the timeout?
A wiring diagram is needed. A simple photo of a hand drawn will work fine. Does the XIAO need pullups? I ask because I see it mentioned in the error message. I have never heard of xfer_timeout_ms
Give this a try: Wire.setWireTimeout(3000 /* us /, true / reset_on_timeout */); // Wire.setClock ( 400000L ) ; This is from code I currently am working on. Also check this link: https://docs.arduino.cc/language-reference/en/functions/communication/wire/setWireTimeout/
If that does not get it for you follow @sonofcy suggestion and post an annotated schematic showing exactly how you have wire it. Be sure to note all power sources etc.
I saw this solution, but my board doesnt support this function. If I set Xiao esp32c3 board, the code with this function doesnt compile. With different board it does.
I am using xiaoesp32c3 from esp32 library (v 3.2.0.) from Espressif Systems