ESP32 I2C HMC5883L library for esp-idf This is a library of hmc5883l for esp-idf. Code modified from Arduino-HMC5883L. The I2C driver is a software one. So you can use any two GPIO pins which support both input and output as SDA and SCL.