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.
main.cpp@0:ed40790a022a, 2013-09-05 (annotated)
- Committer:
- viswesr
- Date:
- Thu Sep 05 02:19:37 2013 +0000
- Revision:
- 0:ed40790a022a
First version
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| viswesr | 0:ed40790a022a | 1 | #include "mbed.h" |
| viswesr | 0:ed40790a022a | 2 | |
| viswesr | 0:ed40790a022a | 3 | /* Configure a GPIO pin as output for controlling a LED. 'led' is user assigned name and |
| viswesr | 0:ed40790a022a | 4 | 'LED1' is a internal name given to a port pin P1_8 in this Arch platform. */ |
| viswesr | 0:ed40790a022a | 5 | DigitalOut led(LED1); |
| viswesr | 0:ed40790a022a | 6 | |
| viswesr | 0:ed40790a022a | 7 | int main() |
| viswesr | 0:ed40790a022a | 8 | { |
| viswesr | 0:ed40790a022a | 9 | while(1) { |
| viswesr | 0:ed40790a022a | 10 | led = 1; // Switch ON the LED. |
| viswesr | 0:ed40790a022a | 11 | wait(0.5); // Wait for 0.5 Seconds. |
| viswesr | 0:ed40790a022a | 12 | led = 0; // Switch OFF the LED. |
| viswesr | 0:ed40790a022a | 13 | wait(0.5); // Wait for 0.5 Seconds. |
| viswesr | 0:ed40790a022a | 14 | } |
| viswesr | 0:ed40790a022a | 15 | } |