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:1b2d816669da, 2020-09-08 (annotated)
- Committer:
- buble
- Date:
- Tue Sep 08 14:14:24 2020 +0000
- Revision:
- 28:1b2d816669da
- Parent:
- 27:317e04648a84
- Child:
- 29:2c45448992a0
Version_1_double_BP
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| buble | 25:7248bf24d36e | 1 | #include "mbed.h" //inclue la bibliotheque mbed.h |
| dan | 0:7dec7e9ac085 | 2 | |
| buble | 28:1b2d816669da | 3 | DigitalOut Led_verte(PTE26); |
| buble | 28:1b2d816669da | 4 | DigitalOut Led_rouge(PTB22); |
| buble | 28:1b2d816669da | 5 | DigitalIn BP3(D5); |
| buble | 27:317e04648a84 | 6 | DigitalIn BP2(D7); |
| dan | 0:7dec7e9ac085 | 7 | |
| buble | 27:317e04648a84 | 8 | int main() { |
| buble | 27:317e04648a84 | 9 | while(1){ |
| buble | 27:317e04648a84 | 10 | if (BP2==1) |
| buble | 27:317e04648a84 | 11 | { |
| buble | 28:1b2d816669da | 12 | Led_verte=0; |
| buble | 27:317e04648a84 | 13 | } |
| buble | 27:317e04648a84 | 14 | else |
| buble | 27:317e04648a84 | 15 | { |
| buble | 28:1b2d816669da | 16 | Led_verte=1; |
| buble | 27:317e04648a84 | 17 | } |
| buble | 28:1b2d816669da | 18 | if (BP3==1) |
| buble | 28:1b2d816669da | 19 | { |
| buble | 28:1b2d816669da | 20 | Led_rouge=0; |
| buble | 28:1b2d816669da | 21 | } |
| buble | 28:1b2d816669da | 22 | else |
| buble | 28:1b2d816669da | 23 | { |
| buble | 28:1b2d816669da | 24 | Led_rouge=1; |
| buble | 28:1b2d816669da | 25 | } |
| stevep | 4:81cea7a352b0 | 26 | } |
| dan | 0:7dec7e9ac085 | 27 | } |