Forum 2005-2010 (read only)
Topic: I2C timeout?
(Read 328 times)
Oct 20, 2009, 04:33 pm
I'm using an I2C network to connect a couple of Arduclemas (an Arduino derivative with screw terminals on all pins, and I2C pullUp resistors).
My problem is this: if one node card (microcontroller) fails or leaves the network, the Master seems to block indefinitely while doing Wire.endTransmission(). I can't seem to find a way to check if the node is alive before talking to it, or recover gracefully (and quickly) when the communication fails. The ideia is to have a timeout when communicating; if it takes more than a few ms just return in error and keep going.
Has anyone found a way to deal with this?