Balkrishna Wagle
/
mbed_POT_p19_MYBOARDCODE_copy
ADC POT - P19
Revision 0:423587f8c9d2, committed 2018-03-08
- Comitter:
- rajivwagle
- Date:
- Thu Mar 08 12:15:38 2018 +0000
- Commit message:
- ADC CHECK THRU POT
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 Thu Mar 08 12:15:38 2018 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" + +Serial pc(USBTX,USBRX); + +AnalogIn Ain(p19); + +unsigned short i; + +int main() { + + pc.printf("\r\nPOT Test program"); + + pc.printf("\r\n******************\r\n"); + + wait(1); // wait 1 second for device stab + + while(1) { + + i=Ain.read_u16(); + + pc.printf("POT Voltage is %d v \r\n",i); + + wait_ms(1000); + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Mar 08 12:15:38 2018 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/fb8e0ae1cceb \ No newline at end of file