How to update my I2C wire library

About a month ago there was an update to the Wire library to include timeouts.
I didn’t see an option to update the wire library and I am not sure how can I use this much needed and wanted updates (Timeout handling).
If it matters I am using the following specs in my platfrom.ini:

platform = ststm32@5.7
board = bluepill_f103c8_128k
framework = arduino


Did you find a solution for this ?

The latest STSTM32 platform (Releases · platformio/platform-ststm32 · GitHub) already uses the latest stable 2.0.0 release of So if you just use platform = ststm32 and have the ST STM32 platform updated (VSCode → PlatformIO Home → Platforms → Updates), you have the latest stable version of the core, including the Wire library.

What exact problem do you have?

If i remember correctly i have taken the updated wire library and used it as an external library (I think I had to rename a bit).

Using the Adafruit_SSD1306 with a 128 x 32 display, just did a demo, with the text updating a few times a second, works fine for just over an hour, then the display goes black - the program is still running (output to serial is fine).

I tried setting “Wire.setTimeout(1000);”

but still ‘dies’, my library doesn’t have the “setWireTimeout”

All the references seem to talk about a ‘hangup’, but my code keeps running, just the display is black ! ? Perhaps it’s a different fault ?

The Adafruit libraries reference the wire lib, so without re-writing them all, I could patch in another copy easily.

You may want to open an issue about this in the Arduino core implementation you’re using, or the Adafruit-SSD1306 library, they can help you better.

It might also pay off to get a logic analyzer (there are very cheap Salae clone ones) to continously capture the I2C bus with it, to see what exactly is going on on the wires.