1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-22 21:23:07 +03:00

Analog input voltage can be 3.3V (#5020)

* Analog input voltage can be 3.3V

According to this tutorial and my personal test with my Amica, 1.0V delivers 320 and 3.3V delivers 1024 at 10-bit resolution. I guess 3.3V is possible.

* Update reference.rst

Added warnings.

* Update reference.rst

* Update reference.rst

requested  changes
This commit is contained in:
SarenT 2018-08-14 03:53:39 +02:00 committed by Develo
parent a0e6d22ac1
commit cbcefa7d3f

View File

@ -42,7 +42,12 @@ either to read voltage at ADC pin, or to read module supply voltage
(VCC). (VCC).
To read external voltage applied to ADC pin, use ``analogRead(A0)``. To read external voltage applied to ADC pin, use ``analogRead(A0)``.
Input voltage range is 0 — 1.0V. Input voltage range of bare ESP8266 is 0 — 1.0V, however some many
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.
However values around ~150 indicates that the maximum voltage is
likely to be 3.3V.
To read VCC voltage, use ``ESP.getVcc()`` and ADC pin must be kept To read VCC voltage, use ``ESP.getVcc()`` and ADC pin must be kept
unconnected. Additionally, the following line has to be added to the unconnected. Additionally, the following line has to be added to the