Esp32 with RTC ds1307

Hello, I have a problem with RTC ds1307 and esp32, I have previously used the RTC with Arduino UNO with ErriezDS1307 library and it was working perfectly with the example, but It won’t work with the esp32. The library documentation says that it should work with esp32 as well on gpio 21(SDA) and 22(SCL). The problem may be with powering off the rtc (link to RTC ), as on the schema it says it have to be 5V, but the esp has only 3.3v and in the documentation of the library. I tried also powering it with an external source of 5v or 3.3v. Nothing has worked, the wiring is good, as I have to check it with a multimeter. The example code stops just on the rtc.begin() line and don’t recognize any RTC on i2c lines.

This page on using I2C with the ESP32 may be of interest. There is an I2C scanner that you can use to confirm communication with the bus and the I2C address(es).

Connecting a 3.3 volt device with a 5 volt is not advisable without level interfacing devices.