1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

Merge pull request #1509 from lnxbil/patch-1

Add VCC readout
This commit is contained in:
Ivan Grokhotkov 2016-01-31 22:35:36 +03:00
commit 7019b950bf

View File

@ -36,7 +36,7 @@ ESP8266 has a single ADC channel available to users. It may be used either to re
To read external voltage applied to ADC pin, use `analogRead(A0)`. Input voltage range is 0 — 1.0V.
To read VCC voltage, ADC pin must be kept unconnected. Additionally, the following line has to be added to the sketch:
To read VCC voltage, use `ESP.getVcc()` and ADC pin must be kept unconnected. Additionally, the following line has to be added to the sketch:
```c++
ADC_MODE(ADC_VCC);