ESP32 WiFi / ADC conflict
Posted: Sun Jun 16, 2024 4:52 pm
Hi,
Has anyone else experienced issues using both an ADC and the WiFi components on a ESP32 Vroom? When I sample the ADC following connecting to a WiFi network the ESP does not respond as expected and restarts the program. If I run the program without a WiFi connection it is stable. Similarly, if I run the program with WiFi but don't sample the ADC it's also stable. Call the two together and it falls over.
Attached bellow is a stripped down version of a much larger automation project. This was the least functionality I could maintain and still demonstrate the issue. The complete program works well, unless you connect to a WiFi network, then its erratic. If any one fancies taking a look, if you run the program as is, it will fall over if the 'Up' or 'Down' inputs are triggered following the initial start-up routine. If you remove the ADC sampling before the main loop the program will run as expected.
I don't know if this is a bug in FC, or there is a strange conflict internal to the ESP between the ADC on channel An38 and the WiFi processes? Any advice or insight would be much apricated!
Cheers,
MB
Has anyone else experienced issues using both an ADC and the WiFi components on a ESP32 Vroom? When I sample the ADC following connecting to a WiFi network the ESP does not respond as expected and restarts the program. If I run the program without a WiFi connection it is stable. Similarly, if I run the program with WiFi but don't sample the ADC it's also stable. Call the two together and it falls over.
Attached bellow is a stripped down version of a much larger automation project. This was the least functionality I could maintain and still demonstrate the issue. The complete program works well, unless you connect to a WiFi network, then its erratic. If any one fancies taking a look, if you run the program as is, it will fall over if the 'Up' or 'Down' inputs are triggered following the initial start-up routine. If you remove the ADC sampling before the main loop the program will run as expected.
I don't know if this is a bug in FC, or there is a strange conflict internal to the ESP between the ADC on channel An38 and the WiFi processes? Any advice or insight would be much apricated!
Cheers,
MB