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@31:f4772bdf91c1, 2020-09-08 (annotated)
- Committer:
- xavier_majorel
- Date:
- Tue Sep 08 15:06:24 2020 +0000
- Revision:
- 31:f4772bdf91c1
- Parent:
- 30:b5d058925715
- Child:
- 32:4d02d78d0c44
version1:commande led bleu SW2 good
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
xavier_majorel | 28:f1e7e7d7959f | 1 | #include "mbed.h" |
dan | 0:7dec7e9ac085 | 2 | |
xavier_majorel | 30:b5d058925715 | 3 | DigitalOut Led_bleue(PTB21); |
xavier_majorel | 30:b5d058925715 | 4 | DigitalIn BP2(PTC6); |
xavier_majorel | 28:f1e7e7d7959f | 5 | int main() { |
xavier_majorel | 29:32f644b921a5 | 6 | while(1) { |
xavier_majorel | 30:b5d058925715 | 7 | if (BP2==1) //si le BP2 est appuyé; |
xavier_majorel | 30:b5d058925715 | 8 | { |
xavier_majorel | 31:f4772bdf91c1 | 9 | Led_bleue=1; // on éteint la led bleue |
xavier_majorel | 30:b5d058925715 | 10 | } |
xavier_majorel | 30:b5d058925715 | 11 | else // sinon |
xavier_majorel | 30:b5d058925715 | 12 | { |
xavier_majorel | 31:f4772bdf91c1 | 13 | Led_bleue=0; // on allume la led bleue |
xavier_majorel | 30:b5d058925715 | 14 | } |
xavier_majorel | 30:b5d058925715 | 15 | } // fin de boucle infinie |
xavier_majorel | 30:b5d058925715 | 16 | } // fin programme |