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@29:2146e1bb7b4a, 2020-09-08 (annotated)
- Committer:
- selena13
- Date:
- Tue Sep 08 14:50:19 2020 +0000
- Revision:
- 29:2146e1bb7b4a
- Parent:
- 28:1a9ba65b41a4
- Child:
- 30:0c89e3f9bf05
version 2: ; led verte pilote par SW3; led rouge pilote par SW2
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| dan | 0:7dec7e9ac085 | 1 | #include "mbed.h" |
| dan | 0:7dec7e9ac085 | 2 | |
| selena13 | 29:2146e1bb7b4a | 3 | DigitalOut led_rouge (LED4); |
| selena13 | 29:2146e1bb7b4a | 4 | DigitalOut led_verte (LED2); |
| selena13 | 28:1a9ba65b41a4 | 5 | DigitalIn BP2(PTC6); |
| selena13 | 29:2146e1bb7b4a | 6 | DigitalIn BP3 (PTA4); |
| dan | 0:7dec7e9ac085 | 7 | |
| dan | 0:7dec7e9ac085 | 8 | int main() { |
| dan | 0:7dec7e9ac085 | 9 | while(1) { |
| selena13 | 28:1a9ba65b41a4 | 10 | if (BP2==1) |
| selena13 | 28:1a9ba65b41a4 | 11 | { |
| selena13 | 29:2146e1bb7b4a | 12 | led_rouge = 1; |
| selena13 | 28:1a9ba65b41a4 | 13 | } |
| selena13 | 28:1a9ba65b41a4 | 14 | else |
| selena13 | 28:1a9ba65b41a4 | 15 | { |
| selena13 | 29:2146e1bb7b4a | 16 | led_rouge =0; |
| selena13 | 28:1a9ba65b41a4 | 17 | } |
| selena13 | 29:2146e1bb7b4a | 18 | if (BP3==1) |
| selena13 | 29:2146e1bb7b4a | 19 | { |
| selena13 | 29:2146e1bb7b4a | 20 | led_verte = 1; |
| selena13 | 29:2146e1bb7b4a | 21 | } |
| selena13 | 29:2146e1bb7b4a | 22 | else |
| selena13 | 29:2146e1bb7b4a | 23 | { |
| selena13 | 29:2146e1bb7b4a | 24 | led_verte = 0; |
| selena13 | 29:2146e1bb7b4a | 25 | } |
| selena13 | 29:2146e1bb7b4a | 26 | |
| stevep | 4:81cea7a352b0 | 27 | } |
| dan | 0:7dec7e9ac085 | 28 | } |