How to use the second I2C-Bus HTTC-AB02S?

How can i use the second I2C-Bus?

I tryed

TwoWire I2Ctwo = TwoWire(1);
I2Ctwo.begin();
I2Ctwo.beginTransmission(STS35_I2C_ADDRESS);

but no success!

Greeting

E_T

In Wire.h you can find two reservations … pretty much same thing as other arduino’s.

extern TwoWire Wire;
extern TwoWire Wire1;

Thank you weradus!

I try it with
extern TwoWire Wire1;
Wire1.begin();

but no success!

E_T

Have you tried scanning both busses and see what is returned ?

With

Wire.begin and Sensor connected to SDA and SCL i got values!

Then changing to Wire1.begin … and connecting the sensor to SCL2 and SDA2 i got error code 3 at Wire1.endTransmission(true)

E_T

Schematics are a bit vague, but their might not be pull-up resistor on the 2nd I2C bus …

Thank you Weradus, this is a good hint.

The extern pull-up resistors (on sensorboard) are switched on!

I think there is a library problem. I hope, heltec will have a look at this post!

Greeting

E_T

I think i found a mistake. IO8 is connected to the green LED, so it can’t be used für the second I2C-bus! Its used by GPS!

Good observation Ernst, I completely overlooked that.

Yes, IO8 of AB02S is already occupied by GPS, so the second group of IIC cannot be used normally. Use the second group of IIC under normal circumstances, you can refer to this example:
I2C_SET

Hello Shaffer, thank you for the link!

Wire.begin (100000,1) uses the second I2C bus!

But how is the second I2C bus then connected! IO8 is not possible. I tested Wire1.begin() but it didn’t work at IO8 and IO9!

Oled is connected to I2C one and i want to use I2C two for an I2C-sensor, because the sensor don’t work with OLED together.

E_T

In the library of AB02S, the default second group of IIC pins are IO8 and IO9, and the underlying library has been packaged. But because IO8 is occupied by GPS, the second group of IIC cannot be used. You can use a group of IIC to connect multiple IIC devices, and distinguish them by the IIC addresses of different devices.