BQ27421-G1: sample code for bq27421-G1 (ESP32)

Part Number: BQ27421-G1

Hello Team,

I am using the bq27421-G1 fuel gauge with an ESP32 board programmed using the Arduino IDE.

Could you please share any sample Arduino code or library for bq27421-G1?
I am looking for a basic example that shows:

  • I²C initialization

  • Reading:

    • Battery Voltage

    • Average Current

    • State of Charge (SOC %)

Thank you for your support.

Regards,
Manjusha