summaryrefslogtreecommitdiff
path: root/devices/power_supply_lesen
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2017-06-23 00:18:31 +0200
committersteckbrief <steckbrief@chefmail.de>2017-06-23 00:18:31 +0200
commit3df152f8ec9ced7a81bb3039d713176b9923a659 (patch)
treea0a4963f6b9f6c44b452c6dbb12d8d6ea56954c4 /devices/power_supply_lesen
Initialization of repository
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() {
+}