i try to use 2 I2C bus on a bluepill and and I can't get the second one working.
here is my code to setup them
Code: Select all
#include <Wire.h>
// second I2C on PB_11 (SDA) PB_10 (SCL)
TwoWire Wire2(PB_11, PB_10);
[....]
void setup() {
//alternate pin for I2C1 (wire)
Wire.setSCL(PB_8);
Wire.setSDA(PB_9);
Wire2.setSCL(PB_10);
Wire2.setSDA(PB_11);
[....]
any ideas where to look to get it working ?