Skip to content

Instantly share code, notes, and snippets.

@chaeplin
Last active June 13, 2016 21:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chaeplin/d47c2de3c6d92513996cf0163aed531b to your computer and use it in GitHub Desktop.
Save chaeplin/d47c2de3c6d92513996cf0163aed531b to your computer and use it in GitHub Desktop.
ESP.getVcc.ino
extern "C" {
#include "user_interface.h"
}
ADC_MODE(ADC_VCC);
int vdd;
void setup() {
Serial.begin(115200);
while (!Serial) {
;
}
Serial.println();
vdd = ESP.getVcc();
Serial.println(vdd);
}
void loop() {
vdd = ESP.getVcc();
Serial.println(vdd);
delay(5000);
}
/*
3207
3206
3208
3208
3229
3212
3230
*/
@chaeplin
Copy link
Author

chaeplin commented May 30, 2016

3205
3206
3205
3206
3204
3204
3222
3204
3204
3203
3204
3226
3226
3226
3226
3227
3227
3208
3227
3228
3227
3227
3227
3208
3226
3229
3227
3227
3227
3208
3228
3227
3227
3227
3228
3208
3229
3229
3226
3227

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment