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@4:80f23e9ca455, 2015-07-16 (annotated)
- Committer:
- kenno
- Date:
- Thu Jul 16 12:48:24 2015 +0000
- Revision:
- 4:80f23e9ca455
- Parent:
- 2:b60cb847489c
An example of LED blink with Maple Mini.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| screamer | 0:005629fe3609 | 1 | #include "mbed.h" |
| screamer | 0:005629fe3609 | 2 | |
| kenno | 4:80f23e9ca455 | 3 | DigitalOut myled(PB_1); // PIN D33 = PB1 Maple Mini's LED |
| screamer | 0:005629fe3609 | 4 | |
| screamer | 0:005629fe3609 | 5 | int main() { |
| kenno | 4:80f23e9ca455 | 6 | |
| screamer | 0:005629fe3609 | 7 | while(1) { |
| bcostm | 2:b60cb847489c | 8 | myled = 1; // LED is ON |
| bcostm | 2:b60cb847489c | 9 | wait(0.2); // 200 ms |
| bcostm | 2:b60cb847489c | 10 | myled = 0; // LED is OFF |
| kenno | 4:80f23e9ca455 | 11 | wait(2.0); // 2 sec |
| screamer | 0:005629fe3609 | 12 | } |
| screamer | 0:005629fe3609 | 13 | } |