Enabling I2C on Header - pscrespo/Morpheus-STM32 GitHub Wiki

Enable I2C on pins PB10 and PB11

In order to enable I2C in the GPIO header (i.e. for a screen), edit the the file Wire.cpp in the following directory:

Windows: C:\Users\<username>\.platformio\packages\framework-arduinoststm32-maple\STM32F1\libraries\Wire\

Linux: ~/.platformio/packages/framework-arduinoststm32-maple/STM32F1/libraries/Wire/

In the last line of the file, change "1" to "2"

TwoWire Wire(2);

⚠️ **GitHub.com Fallback** ⚠️