Himanshu Kaushik
/
voltagemeter
for 0-3 v battey pack module
Revision 0:0b26aa1c549c, committed 2021-03-02
- 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