Programme de test pour LPC1768 (affichage de LED avec tempo)

Dependencies:   mbed

main.cpp

Committer:
alainpegatoquet
Date:
2017-09-06
Revision:
4:36752a79e890
Parent:
3:412b0e9270ee
Parent:
2:48ae4b9e8cd8

File content as of revision 4:36752a79e890:

#include "mbed.h"
Serial pc(USBTX, USBRX);
DigitalOut myled(LED1);
DigitalOut myled1(LED3);
AnalogIn Ain(p20);          // Analog input

int main() {
    float ADCdata;
    while(1) {
        myled = 1;
        myled1 = 0;
        wait(1.0);
        myled = 0;
        myled1 = 1;
        wait(1.0);
        ADCdata=Ain.read();
        pc.printf("%f\t%fV \n\r",ADCdata, ADCdata*3.3);
    }
}