lab3_4

Dependencies:   mbed

main.cpp

Committer:
shih775007
Date:
2017-02-26
Revision:
0:01b0c064a032

File content as of revision 0:01b0c064a032:

#include "mbed.h"

AnalogOut Aout(DAC0_OUT);
AnalogIn Ain(A0);
DigitalOut test(LED2);
float ADCdata;

int main(){
    while(1){
        ADCdata = Ain;
        test = 1;
        test = 0;
        Aout = ADCdata;
        test = 1;
        test = 0;
        test = 1;
        test = 0;
    }
}