T Umezawa
/
light2
Battery Voltage Chechk
Diff: main.cpp
- Revision:
- 0:cb9d86e95f4e
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); + } +}