summaryrefslogtreecommitdiff
path: root/devices/power_supply_lesen
diff options
context:
space:
mode:
Diffstat (limited to 'devices/power_supply_lesen')
-rw-r--r--devices/power_supply_lesen/power_supply_lesen.ino38
1 files changed, 38 insertions, 0 deletions
diff --git a/devices/power_supply_lesen/power_supply_lesen.ino b/devices/power_supply_lesen/power_supply_lesen.ino
new file mode 100644
index 0000000..bd8f250
--- /dev/null
+++ b/devices/power_supply_lesen/power_supply_lesen.ino
@@ -0,0 +1,38 @@
+ADC_MODE(ADC_VCC);//Set the ADCC to read supply voltage.
+
+void printValue(char* text, float value) {
+ Serial.print(text);
+ Serial.println(value);
+}
+void printValue(char* text, String value) {
+ Serial.print(text);
+ Serial.println(value);
+}
+
+void readAndPrintEspValues() {
+ printValue("Spannungsversorgung: ", ESP.getVcc());
+ printValue("Free heap: ", ESP.getFreeHeap());
+ printValue("Chip ID: ", ESP.getChipId());
+ printValue("SDK Version: ", ESP.getSdkVersion());
+ printValue("Core Version: ", ESP.getCoreVersion());
+ printValue("Boot Version: ", ESP.getBootVersion());
+ printValue("Boot Mode: ", ESP.getBootMode());
+ printValue("CPU Frequenz MHz", ESP.getCpuFreqMHz());
+ printValue("Flash Chip ID: ", ESP.getFlashChipId());
+ printValue("Flash Chip real size: ", ESP.getFlashChipRealSize());
+ printValue("Flash Chip size: ", ESP.getFlashChipSize());
+ printValue("Flash Chip mode: ", ESP.getFlashChipMode());
+ printValue("Sketch Size: ", ESP.getSketchSize());
+ printValue("Skatch MD5: ", ESP.getSketchMD5());
+ printValue("Free sketch space: ", ESP.getFreeSketchSpace());
+}
+
+void setup() {
+ // Setup console
+ Serial.begin(115200);
+ Serial.println("Booting");
+ readAndPrintEspValues();
+}
+
+void loop() {
+}