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.
Exercice2.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 while(1) { 00009 if (switchinput==1) { 00010 vert.write(1); 00011 orange.write(0); 00012 rouge.write(0); 00013 wait(2); 00014 vert.write(0); 00015 orange.write(1); 00016 rouge.write(0); 00017 wait(0.5); 00018 vert.write(0); 00019 orange.write(0); 00020 rouge.write(1); 00021 wait(2); 00022 } 00023 else if (switchinput==0) { 00024 vert.write(0); 00025 orange.write(0); 00026 rouge.write(0); 00027 wait(2); 00028 vert.write(0); 00029 orange.write(1); 00030 rouge.write(0); 00031 wait(2); 00032 } 00033 } 00034 } */
Generated on Wed Jul 13 2022 07:32:21 by
1.7.2