Mgos_adc_enable returning false

I am trying to read data from analog pH and EC sensors to as ESP32 (Wroom-32D), using the library ADC. But it seems I can’t enable the ADC, as mgos_adc_enable(pin) is returning false. I am calling the enable function at the beginning of my mgos_app_init. (Am doing it twice, since I have two sensors on two pins.)

I then call mgos_adc_read_voltage(pin) in a timer (which understandably gives me values of 0).

Should I use mgos_gpio_set_mode(SensorPin_pH, MGOS_GPIO_MODE_INPUT); as well as mgos_adc_enable? I have tried both with and without, without success.

The valid pins are 32-39

No gpio set is needed.

Oh wow, thanks a lot! These pins don’t seem to be ADC pins when I look at my board’s pin layout, so I was only trying other pins. But this solved it I think. Although only one pin (33) seems to give me reasonable values. The others give me constant values of 142 mV (no connection?).