LilyGo-EPD-4-7-OWM-Weather-Display icon indicating copy to clipboard operation
LilyGo-EPD-4-7-OWM-Weather-Display copied to clipboard

PIN 36 not ADC PIN

Open helios78 opened this issue 10 months ago • 1 comments

Model: 4.7-S3 , V2.3

[ 16458][E][esp32-hal-adc.c:158] __analogRead(): Pin 36 is not ADC pin!

This comes on serial when it tries to read the battery voltage

The board would only work when connected and powered by USB-C from computer

It will not work via battery or USB-C via charger

helios78 avatar Mar 27 '24 22:03 helios78

Same here.

I saw https://github.com/Xinyuan-LilyGO/LilyGo-EPD-4-7-OWM-Weather-Display/issues/4#issuecomment-1693043860 and https://github.com/esphome/feature-requests/issues/1960#issuecomment-1499559255 and https://github.com/kaeltis/esphome-lilygo-t547plus/blob/main/components/lilygo_t5_47_battery/Lilygot547Battery.cpp

The parameters are :

#if CONFIG_IDF_TARGET_ESP32 const uint8_t bat_adc_pin = 36; #else const uint8_t bat_adc_pin = 14; #endiff float voltage = analogRead(bat_adc_pin) / 4096.0 * 6.566 * (vref / 1000.0);

I changed it to ...

#if CONFIG_IDF_TARGET_ESP32 const uint8_t bat_adc_pin = 14;
#else const uint8_t bat_adc_pin = 14; #endif float voltage = analogRead(bat_adc_pin) / 4096.0 * 6.566 * (vref / 1000.0);

Did not solve the problem.

StaRipper avatar May 10 '24 06:05 StaRipper