I have a device that has been running great for weeks, but started throwing an error today. It uses I2C via pins 1 & 2 to communicate with a DS2482 (I2C to 1-wire). One of the commands is:
local e = i2c.write(I2CAddr, "\\xB4");
Normally that command will return a zero indicating that it was successful. Today it started returning a value of -2. I changed the application on this device to a simple I2C scanner to see if it can find any devices on the I2C bus, and it cannot. I then physically power cycled the whole card to see if that would help. It didn’t. Then I ejected the Imp SD card and re-inserted it, everything started working normally.
While looking for similar issues, I came across this thread:
where Hugo mentions a physical issue with the SD socket on the sparkfun breakout board. I’m using a custom PCB, but suspect it may have the same problem. Thoughts?