ESP32Cam LDR integration

Hi! Im trying to port my Arduino Project based on ESP32Cam with a night light and light sensor (Photoresistor LDR).
In Arduino sketch i have used port 14 and work very well but in ESPHOME this GPIO is not allowed ()… how can solve it? esp-wrover-kit board is setted

sensor:
  - platform: adc
    pin: GPIO14
    name: "Skylight Illuminance"
    update_interval: 10s

Could you provide the complete error message you are getting?

The error says that only ports 33 to 39 can be used for adc, but in my arduino its working

The issue is the ESP32 has two ADC modules. ADC1 is from 32 to 39 . The others are on ADC2. And you can not use ADC2 when you use WIFI. That’s why they are not allowed on ESPHome.

(I think that not everyone is using Wifi (ethernet gets more common for example) so it would be a good idea to have some way enable those pins for ADC when wifi is not enabled).

This is logical, thanks.

In Arduino IDE i set the next code to allow use this pinouts

void loop() {
  // ADC Pin Reset: Do this before every analogRead()
  WRITE_PERI_REG(SENS_SAR_READ_CTRL2_REG, reg_b);

Then there arent solution for that, thanks