Inès Legros / Mbed 2 deprecated _er1_test_vcs

Dependencies:   mbed

Committer:
JPP
Date:
Tue Nov 21 15:43:14 2017 +0000
Revision:
2:c0afe99e4314
Parent:
1:17420a732fe8
Child:
3:1d0d5b8471a3
Version 3: tempo de 1s, lecture et affichage d'une entr?e analogique.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JPP 0:1c2d9c93c045 1 #include "mbed.h"
JPP 2:c0afe99e4314 2 Serial pc(USBTX, USBRX);
JPP 0:1c2d9c93c045 3 DigitalOut myled(LED1);
JPP 2:c0afe99e4314 4 AnalogIn Ain(p20);
JPP 2:c0afe99e4314 5
JPP 0:1c2d9c93c045 6
JPP 2:c0afe99e4314 7 int main() {
JPP 2:c0afe99e4314 8 float ADCdata;
JPP 0:1c2d9c93c045 9 while(1) {
JPP 0:1c2d9c93c045 10 myled = 1;
JPP 2:c0afe99e4314 11 wait(1);
JPP 0:1c2d9c93c045 12 myled = 0;
JPP 2:c0afe99e4314 13 wait(1);
JPP 2:c0afe99e4314 14 ACDdata=Ain.read();
JPP 2:c0afe99e4314 15 pc.print("%f\t%fV \n\r", ADCdata, ABCdata*3.3);-
JPP 0:1c2d9c93c045 16 }
JPP 0:1c2d9c93c045 17 }