1

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 AnalogIn   poti(p15);
00004 AnalogIn   ldr(p16);
00005 Serial pc(USBTX, USBRX); // tx, rx
00006 
00007 
00008 int main() {
00009     while(1) {
00010         pc.printf("*****     LDR := %.4f POTI := %.4f     *****\n\r",ldr.read(),poti.read());
00011         wait(1);
00012     }
00013 }