Horloge RTC

Dependencies:   ihm_L476_full RTC_IUT

Committer:
gr91
Date:
Tue May 19 18:08:29 2020 +0000
Revision:
0:b4a900df72eb
Child:
1:1e5f482dad5b
Mesure du temps

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gr91 0:b4a900df72eb 1 #include "mbed.h"
gr91 0:b4a900df72eb 2 Timer temps;
gr91 0:b4a900df72eb 3 Serial pc(SERIAL_TX, SERIAL_RX,9600);
gr91 0:b4a900df72eb 4 int main()
gr91 0:b4a900df72eb 5 {
gr91 0:b4a900df72eb 6 unsigned int t0,t1;
gr91 0:b4a900df72eb 7 temps.start();
gr91 0:b4a900df72eb 8 t0=temps.read_us();
gr91 0:b4a900df72eb 9 pc.printf("Hello World\r\n");
gr91 0:b4a900df72eb 10 t1=temps.read_us();
gr91 0:b4a900df72eb 11 pc.printf("duree mesuree : %d\r\n",t1-t0);
gr91 0:b4a900df72eb 12 while(1);
gr91 0:b4a900df72eb 13 }
gr91 0:b4a900df72eb 14