This example "merges" the wifi station example and the ADC2 example in order to test using wifi and the ADC2 on e.g. the ESP32-WROOM sequentially. As the ADC2 is "disabled" when the WiFi driver is installed and configured, it is only possible to use the two features one at a time if both features are needed in the application - meaning that the WiFi driver must be disconnected and uninstalled for the ADC2 to work.
The example has the following flow:
- Sample the ADC2 channel #0
- Install the wifi driver and connect
- Wait for wifi to "settle" (e.g. server communication would go here)
- Stop wifi, de-init and cleanup
- Repeat from 1.)
(See the README.md file in the upper level 'examples' directory for more information about examples.)
(Based on ESP-IDF version 4.4.2, for version 5.0.1 support legacy ADC support is enabled)
Open the project configuration menu (idf.py menuconfig
).
In the Example Configuration
menu:
- Set the Wi-Fi configuration.
- Set
WiFi SSID
. - Set
WiFi Password
.
- Set