Battery Voltage Chechk

Dependencies:   mbed

Revision:
0:cb9d86e95f4e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Dec 29 04:36:39 2020 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+Serial pc(USBTX, USBRX);
+AnalogIn eps(A0);
+
+int main()
+{
+    double bt;
+    while(1) {
+        bt = (eps.read()*1.431*3.3);
+        pc.printf("Vol = %f\r\n",bt);
+        wait(1.0);
+    }
+}