EasyManuals Logo

Adafruit ESP32-S3 User Manual

Adafruit ESP32-S3
263 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #32 background imageLoading...
Page #32 background image
The LC709203 battery monitor is available over I2C on address0x0B.
OurArduino MAX1704x()orCircuitPython/Python MAX1704x()library code allows you
to read the voltage and percentage whenever you like.
OurArduino LC709203F()orCircuitPython/Python LC709203F()library code allows
you to set the pack size (mAh of the battery which helps tune the calculation), and
read the voltage and percentage whenever you like.
There is no pin on this board that returns battery voltage, but this I2C monitor makes
it super simple to get that data!
In Arduino, you can measure the battery voltage using the following script.
// SPDX-FileCopyrightText: 2023 Liz Clark for Adafruit Industries
//
// SPDX-License-Identifier: MIT
//
// Adafruit Battery Monitor Demo
// Checks for MAX17048 or LC709203F
#include <Wire.h>
#include "Adafruit_MAX1704X.h"
#include "Adafruit_LC709203F.h"
Adafruit_MAX17048 maxlipo;
Adafruit_LC709203F lc;
// MAX17048 i2c address
bool addr0x36 = true;
void setup() {
Serial.begin(115200);
while (!Serial) delay(10); // wait until serial monitor opens
Serial.println(F("\nAdafruit Battery Monitor simple demo"));
// if no max17048..
if (!maxlipo.begin()) {
Serial.println(F("Couldnt find Adafruit MAX17048, looking for LC709203F.."));
// if no lc709203f..
if (!lc.begin()) {
Serial.println(F("Couldnt find Adafruit MAX17048 or LC709203F."));
while (1) delay(10);
©Adafruit Industries Page 32 of 263

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Adafruit ESP32-S3 and is the answer not in the manual?

Adafruit ESP32-S3 Specifications

General IconGeneral
BrandAdafruit
ModelESP32-S3
CategoryMicrocontrollers
LanguageEnglish

Related product manuals