Skip to content

Enabling I2C on Header

Pablo Crespo edited this page Jul 12, 2019 · 1 revision

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);

Clone this wiki locally