cc

Dependencies:   mbed TextLCD

Partie_1/Exercice5.cpp

Committer:
Couscousiste
Date:
2020-06-25
Revision:
0:4651c5d6ca1e

File content as of revision 0:4651c5d6ca1e:

/*#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);
            }           
        }
    }
} */