les gens intelligents
/
Ex1
OKOK
Revision 0:7190ac8f696a, committed 2017-02-06
- Comitter:
- chifterben94
- Date:
- Mon Feb 06 14:14:51 2017 +0000
- Commit message:
- OKOK; ;
Changed in this revision
diff -r 000000000000 -r 7190ac8f696a C12832.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C12832.lib Mon Feb 06 14:14:51 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/askksa12543/code/C12832/#990d5eec2ef6
diff -r 000000000000 -r 7190ac8f696a main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Feb 06 14:14:51 2017 +0000 @@ -0,0 +1,42 @@ +#include "mbed.h" +#include "C12832.h" + +C12832 ecran(PA_7,PA_5,PA_6,PA_8,PB_6); // nom a changer +Ticker t1; // nom a changer +int hour = 23; +int min = 58; +int sec = 50; + +void ecoulementDuTemps(){ // nom a changer + + sec ++; +} + +int main() { + + t1.attach(&ecoulementDuTemps,1); // 2 nom a changer t1 et ecoulementDuTemps + + while(1) { + + if (sec >= 60) + { + sec = 0; + min ++; + } + if (min >= 60) + { + min = 0; + hour ++; + } + if (hour >= 24) + { + hour = 0; + } + + ecran.cls();//nom ecran a changer + ecran.locate(0,0);//nom ecran a changer + ecran.printf("%d : %d : %d",hour,min,sec); // nom ecran a changer + wait_ms(200); // a modifier un peu ne pas depasser 1s + + } +}
diff -r 000000000000 -r 7190ac8f696a mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Feb 06 14:14:51 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/176b8275d35d \ No newline at end of file