Closed timnicolas closed 2 weeks ago
Sorry I totally forgot to get back to this. Looks good but I'd be really interested to find the actual cause, communication error?
Regardless, it makes sense to eliminate the possibility of and endless loop.
Hi! Thanks for the follow-up. I haven’t pinpointed the exact cause, but since implementing this code, I haven’t encountered any more issues.
In some situations, the implementation of the Wire library causes the code to hang. I can't pinpoint the exact situations, but it occurs for me when I'm using BLE and running code that executes quite quickly (with very few
delay
statements).I propose this implementation that allows I2C transmissions to fail gracefully when they get stuck.