Just wondering if there is any way to do some sort of checks to see if a device is present before doing some sort of transaction on that device...
What I am finding is, if I dont have a device connected that should be, the code basically hangs. Is there something that can be done to prevent this?
Also I am finding that the arduino will hang at random and I havent found out why yet. I have made a custom board, I have decoupling caps, I have 1.3K pullup resistors on the SDA and SCL lines at the microcontroller too.
I have a couple of boards which all talk over I2C - I assume I only need pullups at the master?
Find a thread where a member has inserted a time-out in the I2C code two weeks ago... You need that.
1.3k resistors - this is funny value - how comes? 4.7 k should suffice even with 3 or more devices on the bus. Best have the resistors at the end of the bus.
Yep thanks - found it too.
I have modified my files and see how it goes.
Also found part of my stability issues were with exceptions running on one of the slaves, and not making the variables in question volatile. That coupled with the TWI timeout (or lack of it) caused the master to lock up when the slave locked up due to a memory issue.