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:
- 33:710cfcf55052
- Parent:
- 32:4d02d78d0c44
- Child:
- 34:8f695dbf3069
--- a/main.cpp Wed Sep 09 12:02:28 2020 +0000
+++ b/main.cpp Wed Sep 09 12:09:09 2020 +0000
@@ -1,26 +1,18 @@
#include "mbed.h"
-DigitalOut Led_verte(PTE26);
-DigitalOut Led_rouge(PTB22);
-DigitalIn BP2(PTC6);
-DigitalIn BP1(PTA4);
+DigitalOut Led_blanche(D2);
+
+DigitalIn BP2(D3);
+
int main() {
while(1) {
- if (BP2==1) //si le BP2 est appuyé;
+ if (BP2==1)
{
- Led_verte=1; // on éteint la led verte
- }
- else // sinon
- {
- Led_verte=0; // on allume la led verte
+ Led_blanche=1;
}
- if (BP1==1) //si le BP1 est appuyé;
+ else
{
- Led_rouge=1; // on éteint la led rouge
- }
- else // sinon
- {
- Led_rouge=0; // on allume la led rouge
+ Led_blanche=0;
}
} // fin de boucle infinie