Showing posts with label ESP-12. Show all posts
Showing posts with label ESP-12. Show all posts

2018/05/15

ESP8266 - Reading the Vcc

This is a quick summary of how to read the Vcc of ESP8266.

Arduino Sketch

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
// Source: https://github.com/esp8266/Arduino/issues/3800

ADC_MODE(ADC_VCC);

void setup() {
   Serial.begin(115200);
}

void loop() {
 int vcc = ESP.getVcc();
 Serial.println(vcc);
 delay(1000);
}