SensESP icon indicating copy to clipboard operation
SensESP copied to clipboard

Compile error in analog_reader.h with S2 and S3 variants

Open CaptIgmu opened this issue 6 months ago • 7 comments

Getting compile error in platformio with SensESP v3 in file analog_reader.h when using ESP32-S2 and S3 variants:

pio/libdeps/adafruit_qtpy_esp32s3_n4r2/SensESP/src/sensesp/sensors/analog_reader.h:28:30: error: 'ADC_ATTEN_DB_12' was not declared in this scope adc_atten_t attenuation = ADC_ATTEN_DB_12; ^~~~~~~~~~~~~~~ .pio/libdeps/adafruit_qtpy_esp32s3_n4r2/SensESP/src/sensesp/sensors/analog_reader.h:28:30: note: suggested alternative: 'ADC_ATTEN_DB_11'_

I can get it to compile by changing to ADC_ATTEN_DB_11 but noticed in the ESP-IDF docs: enumerator ADC_ATTEN_DB_11 This is deprecated, it behaves the same as ADC_ATTEN_DB_12

So not sure if a Pull request will work for all ESP32s !

Update 8Sept2024: Same error with my new Halmet board with regular ESP32!

CaptIgmu avatar Aug 18 '24 21:08 CaptIgmu