From 209e467120ad0cd84db6bdf8dadd93ea55924f8c Mon Sep 17 00:00:00 2001 From: david gauchard Date: Wed, 14 Apr 2021 19:40:11 +0200 Subject: [PATCH] doc: analogRead must not be called to frequently with WiFi is on (#7981) --- doc/reference.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/reference.rst b/doc/reference.rst index 5cf150f9e..63d2bb7d2 100644 --- a/doc/reference.rst +++ b/doc/reference.rst @@ -74,12 +74,17 @@ pin, except GPIO16. Standard Arduino interrupt types are supported: Analog input ------------ +**NOTE:** +Calling ``analogRead()`` too frequently causes WiFi to stop working. When +WiFi is under operation, ``analogRead()`` result may be cached for at least +5ms between effective calls. + ESP8266 has a single ADC channel available to users. It may be used either to read voltage at ADC pin, or to read module supply voltage (VCC). To read external voltage applied to ADC pin, use ``analogRead(A0)``. -Input voltage range of bare ESP8266 is 0 — 1.0V, however some many +Input voltage range of bare ESP8266 is 0 — 1.0V, however some boards may implement voltage dividers. To be on the safe side, <1.0V can be tested. If e.g. 0.5V delivers values around ~512, then maximum voltage is very likely to be 1.0V and 3.3V may harm the ESP8266.