Production graph and fixed vcc value

This commit is contained in:
Gunnar Skjold
2020-02-15 21:04:18 +01:00
parent eff00f1fe0
commit 9c09740a41
4 changed files with 105 additions and 46 deletions

View File

@@ -3,9 +3,9 @@
double HwTools::getVcc() {
#if defined(ARDUINO_ESP8266_WEMOS_D1MINI)
return (((double) ESP.getVcc()) / 1000) * 1.1; // This board has a voltage divider on VCC, add 10%
return (((double) ESP.getVcc()) / 1024) * 1.1; // This board has a voltage divider on VCC, add 10%
#elif defined(ESP8266)
return ((double) ESP.getVcc()) / 1000;
return ((double) ESP.getVcc()) / 1024;
#endif
return -1;
}