Marcio Mathias / Mbed 2 deprecated mam_02

Dependencies:   mbed

main.cpp

Committer:
mmathias
Date:
2013-09-14
Revision:
0:d747e8c38639

File content as of revision 0:d747e8c38639:

#include "mbed.h"

DigitalOut myled(LED_RED);
Timer M1;
AnalogIn ain(PTC2);

int main() {
    
    while(1) {
        M1.start();
        myled = 1;
        printf("Entrada do AD:%f\n",ain.read());  
        myled = 0;
        M1.stop();
        printf("O tempo gasto foi de %f segundos\n", M1.read());
    }
}