I2C problem with platformio

Hello all,
I’m having some problems with I2C using this .ini configuration on a ESP32-WROOM:
platform = espressif32@3.5.0
board = esp32doit-devkit-v1
framework = arduino

The code i’m running is a simple i2c scanner, and the result is that it sistematically shows a device and right on the next scan (every 5 sec) it doesnt show any device.
However, if i use the Arduino app with esp32 2.0.2 version, the exactly same code now behaves as expected, showing the i2c device on every scan.

What’s going on ?

Please, no one can shed a light about this ?

Well PlatformIO is using 1.0.6, as discussed in many other topics here already and in Support for the latest Arduino v2.0 · Issue #619 · platformio/platform-espressif32 · GitHub. So you can’t expect the same behavior.

Replace this with platform = https://github.com/Jason2866/platform-espressif32.git. Does it work better?

That completly solves the problem!!!
It’s always a nightmare for me understanding all the different platforms , framework and platform_packages :unamused:

The issue of an outdated Arduino-ESP32 is on its way to be solved though.