aa

Dependencies:   mbed

Fork of VAT_LAB4_SERIALPOT by Anmol sardhalia

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 Serial pc (USBTX,USBRX);
00003 AnalogIn pot(PTB0);
00004 main()
00005 {
00006     float value=0;
00007     while(1)
00008     {
00009         value=pot.read()*3.3;
00010         pc.printf("pot=%0.2f \n \r",value);
00011         
00012         wait(1.0);
00013     }
00014 }
00015 
00016     
00017     
00018