This is needed b/c the arduino-pico core doesn't define WIRE_INTERFACES_COUNT properly, so U8g2 library does not include code to send bytes over Wire1.
If we add the compile-time flag -D WIRE_INTERFACES_COUNT=2 then U8g2 will use the 2nd HW I2C (via U8G2_SSD1306_72X40_ER_F_2ND_HW_I2C) and then we do not need to modify any libraries but just need the compile time flag and
Wire1.setSDA(22);
Wire1.setSCL(23);
And the display will work properly.
This is needed b/c the arduino-pico core doesn't define
WIRE_INTERFACES_COUNTproperly, so U8g2 library does not include code to send bytes overWire1.If we add the compile-time flag
-D WIRE_INTERFACES_COUNT=2then U8g2 will use the 2nd HW I2C (viaU8G2_SSD1306_72X40_ER_F_2ND_HW_I2C) and then we do not need to modify any libraries but just need the compile time flag andAnd the display will work properly.