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
Revision 31:f5fbe3be117d, committed 2020-09-08
- Comitter:
- cauvinf
- Date:
- Tue Sep 08 15:04:22 2020 +0000
- Parent:
- 30:425970eb469b
- Commit message:
- version 3 -GPIO avec grove
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Sep 08 14:49:19 2020 +0000 +++ b/main.cpp Tue Sep 08 15:04:22 2020 +0000 @@ -1,8 +1,8 @@ #include "mbed.h" // Ajout de la librairie "mbed.h" -DigitalOut Led_verte(LED2); +DigitalOut Led_verte(D2); DigitalOut Led_rouge(LED1); -DigitalIn BP2(PTC6); +DigitalIn BP2(D3); DigitalIn BP3(PTA4); int main() { // fonction principale @@ -15,14 +15,5 @@ { Led_verte = 0; // on allume la led bleue } - if (BP3 == 1) // si le BP2 est appuyé - { - Led_rouge = 1; // on eteint la led bleue - } - else // else - { - Led_rouge = 0; // on allume la led bleue - } - } // fin boucle infinie } // fin programme.