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@30:0c89e3f9bf05, 2020-09-08 (annotated)
- Committer:
- selena13
- Date:
- Tue Sep 08 15:05:33 2020 +0000
- Revision:
- 30:0c89e3f9bf05
- Parent:
- 29:2146e1bb7b4a
version 3 -GPIO avec grove
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 | 30:0c89e3f9bf05 | 3 | DigitalOut led (D2); |
| selena13 | 30:0c89e3f9bf05 | 4 | DigitalIn BP (D3); |
| dan | 0:7dec7e9ac085 | 5 | |
| dan | 0:7dec7e9ac085 | 6 | int main() { |
| dan | 0:7dec7e9ac085 | 7 | while(1) { |
| selena13 | 30:0c89e3f9bf05 | 8 | if (BP==1) |
| selena13 | 28:1a9ba65b41a4 | 9 | { |
| selena13 | 30:0c89e3f9bf05 | 10 | led = 1; |
| selena13 | 28:1a9ba65b41a4 | 11 | } |
| selena13 | 28:1a9ba65b41a4 | 12 | else |
| selena13 | 28:1a9ba65b41a4 | 13 | { |
| selena13 | 30:0c89e3f9bf05 | 14 | led =0; |
| selena13 | 29:2146e1bb7b4a | 15 | } |
| selena13 | 29:2146e1bb7b4a | 16 | |
| stevep | 4:81cea7a352b0 | 17 | } |
| dan | 0:7dec7e9ac085 | 18 | } |