Neu: Die KI-Firewall überwacht die gesamte Plattform und erklärt jeden Vorfall in einfachen Worten. So funktioniert es

Reply To: ESP32 scanner finds my sensors on GPIO32/33, the libraries do not

Not fixed, the ESP32 can route I2C to almost any pin through its GPIO matrix. The scanner working proves your wiring is fine.

What happens is that sht4.begin() and ina219.begin() with no arguments call Wire.begin() again inside the library, and a bare Wire.begin() puts the bus back on the default pins 21 and 22. That moves I2C away from your sensors and onto your RS-485 transceiver, which explains the second symptom too.

Give the libraries the bus you already started:

Wire.begin(32, 33);
Wire.setClock(100000);
if (!sht4.begin(&Wire)) Serial.println("SHT40 not found");
if (!ina219.begin(&Wire)) Serial.println("INA219 not found");

Most of the Adafruit libraries take a TwoWire*. If one does not, use Wire1 for the sensors and leave Wire alone.

On pin choice: 34 to 39 are input only, so never SDA or SCL. And stay off the strapping pins 0, 2, 12 and 15 if you can, a pull-up on 12 can stop the board from booting.

QoS 1 and a lot of patience.
Akzeptierte Lösung♥ 8