SuperHouse / esp-open-rtos

Open source FreeRTOS-based ESP8266 software framework
BSD 3-Clause "New" or "Revised" License
1.52k stars 491 forks source link

Fluctuating ADC with stabilized source #691

Open hawkhsieh opened 5 years ago

hawkhsieh commented 5 years ago

I am suffering from the fluctuating ADC result. The sampling series shows below picture

2019-01-11 1 26 17

There are lots of spikes when sampling. I notice that this issue is discussed in https://github.com/esp8266/Arduino/issues/2070

The solution is to prevent wifi in sleeping mode by calling

    sdk_wifi_set_sleep_type(WIFI_SLEEP_NONE);

I have tried this solution, but not cancel the spike. Is anyone try to fix it in this esp-open-rtos project?