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

Add VCC readout

This commit is contained in:
Andreas Steinel 2016-01-27 00:26:03 +01:00
parent aeb9597ccf
commit 7506055e8d

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);