ADC POT - P19

Dependencies:   mbed

main.cpp

Committer:
rajivwagle
Date:
2018-03-08
Revision:
0:423587f8c9d2

File content as of revision 0:423587f8c9d2:

#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);
         
    }
}