Battery Voltage Chechk

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
umezawa
Date:
Tue Dec 29 04:36:39 2020 +0000
Commit message:
test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r cb9d86e95f4e main.cpp
--- /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);
+    }
+}
diff -r 000000000000 -r cb9d86e95f4e mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Dec 29 04:36:39 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file