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:1a9ba65b41a4, 2020-09-08 (annotated)
- Committer:
- selena13
- Date:
- Tue Sep 08 14:35:54 2020 +0000
- Revision:
- 28:1a9ba65b41a4
- Parent:
- 27:b80950a0e3e0
- Child:
- 29:2146e1bb7b4a
version 1: commande led bleue avec 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 | 28:1a9ba65b41a4 | 3 | DigitalOut led_bleue (LED3); |
| selena13 | 28:1a9ba65b41a4 | 4 | DigitalIn BP2(PTC6); |
| dan | 0:7dec7e9ac085 | 5 | |
| dan | 0:7dec7e9ac085 | 6 | int main() { |
| dan | 0:7dec7e9ac085 | 7 | while(1) { |
| selena13 | 28:1a9ba65b41a4 | 8 | if (BP2==1) |
| selena13 | 28:1a9ba65b41a4 | 9 | { |
| selena13 | 28:1a9ba65b41a4 | 10 | led_bleue = 0; |
| selena13 | 28:1a9ba65b41a4 | 11 | } |
| selena13 | 28:1a9ba65b41a4 | 12 | else |
| selena13 | 28:1a9ba65b41a4 | 13 | { |
| selena13 | 28:1a9ba65b41a4 | 14 | led_bleue=1; |
| selena13 | 28:1a9ba65b41a4 | 15 | } |
| stevep | 4:81cea7a352b0 | 16 | } |
| dan | 0:7dec7e9ac085 | 17 | } |