help
/
Info_2_TD
cc
Diff: Partie_1/Exercice5.cpp
- Revision:
- 0:4651c5d6ca1e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Partie_1/Exercice5.cpp Thu Jun 25 16:30:18 2020 +0000 @@ -0,0 +1,29 @@ +/*#include "mbed.h" +DigitalOut rouge(p5); +DigitalOut orange(p8); +DigitalOut vert(p6); +DigitalIn switchinput(p7); +int main() { + switchinput.mode(PullUp); + vert.write(0); + orange.write(0); + rouge.write(0); + int cpt=0; + while(1) { + if (switchinput==0) { + vert.write(1); + orange.write(0); + rouge.write(0); + wait(0.2); + + } + if (switchinput==0) { + cpt=cpt+1; + if(cpt==10){ + vert.write(0); + orange.write(1); + rouge.write(0); + } + } + } +} */ \ No newline at end of file