ESP32 communicate with I2C devices

Hardware connectionOn the ESP32 microcontroller, there are several pairs of GPIO pins that can be used for I2C communication. The default I2C pins on the ESP32 are GPIO 21 (SDA) and GPIO 22 (SCL), but...
ESP32/Arduino Scan Device I2C Address

ESP32/Arduino finds the address of I2C deviceWhen uses I2C devices, it often needs to check whether the I2C device communicates rightly, or the device's I2C address is set wrong.This code will scan th...