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:
- 30:b5d058925715
- Parent:
- 29:32f644b921a5
- Child:
- 31:f4772bdf91c1
--- a/main.cpp Tue Sep 08 14:14:03 2020 +0000
+++ b/main.cpp Tue Sep 08 15:02:53 2020 +0000
@@ -1,12 +1,16 @@
#include "mbed.h"
-DigitalOut myled(PTA1);
-
+DigitalOut Led_bleue(PTB21);
+DigitalIn BP2(PTC6);
int main() {
while(1) {
- myled = 0;
- wait(0.5);
- myled = 1;
- wait(1.5);
- }
-}
+ if (BP2==1) //si le BP2 est appuyé;
+ {
+ Led_bleue=0; // on éteint la led bleue
+ }
+ else // sinon
+ {
+ Led_bleue=1; // on allume la led bleue
+ }
+ } // fin de boucle infinie
+} // fin programme