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
main.cpp@28:ee8094c22b43, 2020-09-08 (annotated)
- Committer:
- cauvinf
- Date:
- Tue Sep 08 14:25:07 2020 +0000
- Revision:
- 28:ee8094c22b43
- Parent:
- 27:994c549bf33e
- Child:
- 29:64501815055f
version1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
cauvinf | 25:df8141dc98b3 | 1 | #include "mbed.h" // Ajout de la librairie "mbed.h" |
dan | 0:7dec7e9ac085 | 2 | |
cauvinf | 28:ee8094c22b43 | 3 | DigitalOut Led_bleue(LED3); |
cauvinf | 28:ee8094c22b43 | 4 | DigitalIn BP2(PTC6); |
dan | 0:7dec7e9ac085 | 5 | |
cauvinf | 27:994c549bf33e | 6 | int main() { // fonction principale |
cauvinf | 27:994c549bf33e | 7 | while(1) { // boucle pendant 1 |
cauvinf | 28:ee8094c22b43 | 8 | if (BP2 == 1) // si le BP2 est appuyé |
cauvinf | 28:ee8094c22b43 | 9 | { |
cauvinf | 28:ee8094c22b43 | 10 | Led_bleue = 0; // on eteint la led bleue |
cauvinf | 28:ee8094c22b43 | 11 | } |
cauvinf | 28:ee8094c22b43 | 12 | else // else |
cauvinf | 28:ee8094c22b43 | 13 | { |
cauvinf | 28:ee8094c22b43 | 14 | Led_bleue = 1; // on allume la led bleue |
cauvinf | 28:ee8094c22b43 | 15 | } |
cauvinf | 28:ee8094c22b43 | 16 | |
cauvinf | 28:ee8094c22b43 | 17 | } // fin boucle infinie |
cauvinf | 28:ee8094c22b43 | 18 | } // fin programme |