Hi, folks. First post here. I recently set up a Spark Core on our office fridge to post HipChat messages. I am using the ported libraries found here:
For the record, it works quite well. However…I am seeing periodic “freezes” of the display. The behavior is that the spark will still be online, will still respond to API function() calls, still seems to be doing it’s job. However, the display itself ends up frozen in a past state. My theory is that due to a timeout or due to a jostle (it’s mounted to the fridge door) it is losing intermittent connectivity to the I2C bus. I’m not sure how to detect the health of the I2C bus to verify this.
If my theory is correct, rerunning the “begin” function would reinitialize the SSD1306 and reestablish the connection. I could do this hourly, but this seems kludgy. I could do this on every refresh, but it seems wasteful and causes a flash of the display.
Am I missing something that I could be doing to enable a long-running connection to this LCD display? Because it appears that no wire.end() or display.end() exists in the official libraries, it is not currently possible to say (1) initialize the display (2) paint the display (3) terminate the connection entirely.
Any thoughts here? I’m wondering if there is a way to solve this without hacking the existing SSD1306 library or putting a hourly loop to kick the Spark in the pants to get it to reconnect. I’d love to hear that I’m completely misinformed about this behavior.
I’m very much enjoying the device so far. Thanks!