Hello!
Assuming that esp32-s3 is a supported platform by now, I am stuck with some error messages, indicative that when it comes to ADC2, esphome could be operating in parallel, imaginary reality.
The code
esp32:
board: esp32s3box
framework:
type: arduino
sensor:
- platform: adc
id: battery_voltage
pin:
number: GPIO14
produces an error
Failed config sensor.adc: ESP32S3 doesn't support ADC on this pin when Wi-Fi is configured
.
This is kind of untrue. esp32 errata doesn’t apply to esp32-s3 to the full extent. Who can fix that misconception about ADC2 and Wi-Fi, please?
Using the hint 'ignore_pin_validation_error: true'
, I enter into an uncharted territory. Instead of ignoring the pin validation error, esphome puts a different excuse forward: 'GPIO14 is not a reserved pin'
. Excuse me! Reserved by whom?! And what for?
This bug results in developers going an extra mile, with introduction of redundant code and more importantly new bugs.
External component
external_components:
- source: github://kaeltis/esphome-lilygo-t547plus
components: ["lilygo_t5_47_battery"]
simply does analogRead(14)
, turns EPD power on and off unnecessarily, introduces an extra delay(100)
and hard codes 2x unnecessary for this component libraries ("Wire", version="2.0.0")
and ("LilyGoEPD47", repository="https://github.com/Xinyuan-LilyGO/LilyGo-EPD47", version="v0.3.0")
.
What’s the easiest way to get past 'not a reserved pin'
on esp32-s3, please? Assuming, of course, that component adc
is using a reference code and is supported on esp32-s3.
The full log is like follows
t547plus.yaml
~~~~~~~~~~~~~
esp32:
board: esp32s3box
framework:
type: arduino
sensor:
- platform: adc
id: battery_voltage
pin:
number: GPIO14
#ignore_pin_validation_error: true
---
esphome compile t547plus.yaml
<snip />
Failed config
sensor.adc: [source t547plus.yaml:65]
ESP32S3 doesn't support ADC on this pin when Wi-Fi is configured.
platform: adc
id: battery_voltage
pin:
number: 14
mode:
input: True
output: False
open_drain: False
pullup: False
pulldown: False
inverted: False
ignore_pin_validation_error: False
---
esphome compile t547plus.yaml
<snip />
Failed config
sensor.adc: [source t547plus.yaml:65]
platform: adc
id: battery_voltage
GPIO14 is not a reserved pin.
pin:
number: GPIO14
ignore_pin_validation_error: True
/question
/bugreport