After a few hours of research, I was finally able to isolate my strange problem.
In the code below, if I uncomment the lines concerning wifi, the analog input A10 (GPIO4) always reports 4095.
Code: Select all
#include <Arduino.h>
#include <WiFi.h>
void setup() {
Serial.begin(115200);
pinMode(A10, INPUT_PULLDOWN);
/* Lines to uncomment to create the problem.
WiFi.mode(WIFI_STA);
WiFi.disconnect();*/
}
void loop() {
int analog = analogRead(A10);
Serial.println(analog, DEC);
}
That said, I don't really understand 2 points :
- You will see in my code that I want to disconnect the wifi => Why does the conflict still exist (Note : Actually after that, I want to use esp_now protocol, which may create the conflict anyway, I don't know)
- As the ESP product range has been mainly designed to be used with Wifi, Why Espressif does not communicate more on that issue and/or write it in big somewhere. ?
And is there a guide somewhere telling precisely which GPIO, ADC ... you can use in which configuration (if possible, I would like to avoid this waste of time in the future) ?
Thanks in advance for all your help and advices.
Antoine