Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Exercice5.cpp
00001 /*#include "mbed.h" 00002 DigitalOut rouge(p5); 00003 DigitalOut orange(p8); 00004 DigitalOut vert(p6); 00005 DigitalIn switchinput(p7); 00006 int main() { 00007 switchinput.mode(PullUp); 00008 vert.write(0); 00009 orange.write(0); 00010 rouge.write(0); 00011 int cpt=0; 00012 while(1) { 00013 if (switchinput==0) { 00014 vert.write(1); 00015 orange.write(0); 00016 rouge.write(0); 00017 wait(0.2); 00018 00019 } 00020 if (switchinput==0) { 00021 cpt=cpt+1; 00022 if(cpt==10){ 00023 vert.write(0); 00024 orange.write(1); 00025 rouge.write(0); 00026 } 00027 } 00028 } 00029 } */
Generated on Wed Jul 13 2022 07:32:21 by
1.7.2