adafruit / Adafruit_CircuitPython_LC709203F

Library for I2C LC709203F battery status and fuel gauge
MIT License
4 stars 10 forks source link

Measuring battery voltage on a adafruit feather esp32-s3 tft fails in circuitpython #20

Open BeatArnet opened 1 year ago

BeatArnet commented 1 year ago

Result:

LC709203F simple test Make sure LiPoly battery is plugged into the board! Zurückverfolgung (jüngste Aufforderung zuletzt): Datei "", Zeile 12, in Datei "/lib/adafruit_lc709203f.py", Zeile 132, in init Datei "/lib/adafruit_lc709203f.py", Zeile 136, in init_RSOC Datei "/lib/adafruit_lc709203f.py", Zeile 257, in _write_word OSError: [Errno 116] ETIMEDOUT

Measuring the distance with the VL53L4CX, air quality with the bme688 and luminance with the bh1750 on the same esp32 works fine. Detaching the sensors does not help.

BeatArnet commented 1 year ago

Meanwhile I have found an additional notice: The library adafruit_lc709203f reports, that there is no sensor at 0xb but I2C-Scan tells: I2C addresses found: ['0xb', '0x23', '0x29', '0x77']

dhalbert commented 1 year ago

The ESP32-S3 cannot use an LC709203F, because of an issue with its I2C implementation. The problem is specific to the S3.

https://github.com/adafruit/circuitpython/issues/6311 https://github.com/espressif/esp-idf/issues/8894#issuecomment-1125564756

This has been a very hard issue to diagnose. There is a problem deep in the ESP-IDF.

BeatArnet commented 1 year ago

@dhalbert Thanks for the answer. Therefore I have to find another solution with the ADC.

dhalbert commented 1 year ago

It works fine on the ESP32-S2, if you are willing to buy another board.

vladak commented 1 year ago

Unfortunately, this bug seems to be hitting ESP32 V2 (running CircuitPython 8.0.0-beta.4) as well: https://forums.adafruit.com/viewtopic.php?p=947702#p947702