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@33:710cfcf55052, 2020-09-09 (annotated)
- Committer:
- xavier_majorel
- Date:
- Wed Sep 09 12:09:09 2020 +0000
- Revision:
- 33:710cfcf55052
- Parent:
- 32:4d02d78d0c44
version 3_GPIO avec grove;
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 | 33:710cfcf55052 | 3 | DigitalOut Led_blanche(D2); |
xavier_majorel | 33:710cfcf55052 | 4 | |
xavier_majorel | 33:710cfcf55052 | 5 | DigitalIn BP2(D3); |
xavier_majorel | 33:710cfcf55052 | 6 | |
xavier_majorel | 28:f1e7e7d7959f | 7 | int main() { |
xavier_majorel | 29:32f644b921a5 | 8 | while(1) { |
xavier_majorel | 33:710cfcf55052 | 9 | if (BP2==1) |
xavier_majorel | 30:b5d058925715 | 10 | { |
xavier_majorel | 33:710cfcf55052 | 11 | Led_blanche=1; |
xavier_majorel | 32:4d02d78d0c44 | 12 | } |
xavier_majorel | 33:710cfcf55052 | 13 | else |
xavier_majorel | 32:4d02d78d0c44 | 14 | { |
xavier_majorel | 33:710cfcf55052 | 15 | Led_blanche=0; |
xavier_majorel | 32:4d02d78d0c44 | 16 | } |
xavier_majorel | 32:4d02d78d0c44 | 17 | |
xavier_majorel | 30:b5d058925715 | 18 | } // fin de boucle infinie |
xavier_majorel | 30:b5d058925715 | 19 | } // fin programme |