for 0-3 v battey pack module

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
himanshukaushik
Date:
Tue Mar 02 09:31:37 2021 +0000
Commit message:
digital voltmeter for 0-3v

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 02 09:31:37 2021 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+Serial pc(USBTX, USBRX);
+AnalogIn Ain(p18);
+float ADCdata=0;
+float b=0.3050313;
+int main() {
+ pc.printf("ADC Data Values... \n\r");
+ while (1) {
+ ADCdata=Ain/b;
+ pc.printf("%f \n\r",ADCdata);
+ wait(0.5);
+ }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Mar 02 09:31:37 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file