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.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 28:1b2d816669da
- Parent:
- 27:317e04648a84
- Child:
- 29:2c45448992a0
--- a/main.cpp Tue Sep 08 14:06:05 2020 +0000
+++ b/main.cpp Tue Sep 08 14:14:24 2020 +0000
@@ -1,17 +1,27 @@
#include "mbed.h" //inclue la bibliotheque mbed.h
-DigitalOut Led_bleue(PTB21);
+DigitalOut Led_verte(PTE26);
+DigitalOut Led_rouge(PTB22);
+DigitalIn BP3(D5);
DigitalIn BP2(D7);
int main() {
while(1){
if (BP2==1)
{
- Led_bleue=0;
+ Led_verte=0;
}
else
{
- Led_bleue=1;
+ Led_verte=1;
}
+ if (BP3==1)
+ {
+ Led_rouge=0;
+ }
+ else
+ {
+ Led_rouge=1;
+ }
}
}