Go Down

Topic: Wire library and blocking read/writes (Read 24785 times) previous topic - next topic

borref

Quote
Is there any mechanism for doing that other than changing the Wire library file

I would just make a copy of the library, modify and then rename it to avoid conflict with the standard version. Either copy all the source files to your sketch directory or put a copy of the library in the user library section.

lefstin

Quote
I would just make a copy of the library, modify and then rename it to avoid conflict with the standard version.


Blindingly obvious once you mentioned it.... :D

Commenting out those lines worked fine.  The I2C pins don't go high on Wire.begin now, and the communication seems to work fine with pullups to 3.3v.  Thanks for your help!

mattreba

#17
Oct 05, 2010, 06:57 pm Last Edit: Oct 05, 2010, 06:57 pm by mattreba Reason: 1
I'd like to resurrect the topic related to hanging on disconnect of I2C device when using the Wire library. I have a project (http://www.brewtroller.com) that allows the use of one or more optional I2C displays. I'm having the same problem that if the device is unplugged (either at boot up or during execution) the sketch hangs. We'd like to add a timeout or use non-blocking logic to send the data even if the client isn't listening. Since the function of this optional device is not critical to the primary application we'd prefer that disconnecting it does not result in a hang.

Go Up