Day 4 Starts Isme potentiometer ka float value dikhtai screen me

Dependencies:   mbed

main.cpp

Committer:
akashlal
Date:
2016-07-01
Revision:
0:55e949f5d86a

File content as of revision 0:55e949f5d86a:

#include "mbed.h"

Serial pc(USBTX,USBRX);
AnalogIn pot(PTB0);

float value;
int main() 
{
    while(1) 
    {
        value=pot.read();
        value=value*3.33;
        pc.printf("Pot value = %f \n \r",value); //To print value of potentiometer into the terminal
        wait(1.20);
    }
}