QuickFix wrote:Also, for I2C to work correctly, you should pull up the I2C lines (3k3 or 4k7 should be fine).
But, as schufti already mentioned, the port numbers on development boards do not correspond to the actual GPIO-pin of the ESP.
Normally/officially, the correct GPIO of an ESP should be matched with its board's port-name in the Arduino IDE when you select the correct board, but I've never trusted this feature and use the actual GPIO port in code instead of its name.
I've tried to pull up using 10k resistors, I will try to use 4k7 resistors to pull up.