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@7:1e5365d09b90, 2019-04-03 (annotated)
- Committer:
- Jancone
- Date:
- Wed Apr 03 19:09:22 2019 +0000
- Revision:
- 7:1e5365d09b90
- Parent:
- 2:b60cb847489c
IT SWOWS LED1 LIKE A LIGHTHOUSE LAMP
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 | |
screamer | 0:005629fe3609 | 3 | DigitalOut myled(LED1); |
screamer | 0:005629fe3609 | 4 | |
screamer | 0:005629fe3609 | 5 | int main() { |
screamer | 0:005629fe3609 | 6 | while(1) { |
bcostm | 2:b60cb847489c | 7 | myled = 1; // LED is ON |
Jancone | 7:1e5365d09b90 | 8 | wait(0.1); // 3000 ms |
Jancone | 7:1e5365d09b90 | 9 | myled = 0; // LED is Off |
Jancone | 7:1e5365d09b90 | 10 | |
Jancone | 7:1e5365d09b90 | 11 | wait(0.5); // 3000 ms |
Jancone | 7:1e5365d09b90 | 12 | |
Jancone | 7:1e5365d09b90 | 13 | myled = 1; // LED is ON |
Jancone | 7:1e5365d09b90 | 14 | wait(0.1); // 3000 ms |
Jancone | 7:1e5365d09b90 | 15 | myled = 0; // LED is Off |
Jancone | 7:1e5365d09b90 | 16 | |
Jancone | 7:1e5365d09b90 | 17 | wait(0.75); // 3000 ms |
Jancone | 7:1e5365d09b90 | 18 | |
Jancone | 7:1e5365d09b90 | 19 | myled = 1; // LED is ON |
Jancone | 7:1e5365d09b90 | 20 | wait(0.3); // 3000 ms |
Jancone | 7:1e5365d09b90 | 21 | myled = 0; // LED is Off |
Jancone | 7:1e5365d09b90 | 22 | |
Jancone | 7:1e5365d09b90 | 23 | |
Jancone | 7:1e5365d09b90 | 24 | |
Jancone | 7:1e5365d09b90 | 25 | |
Jancone | 7:1e5365d09b90 | 26 | |
Jancone | 7:1e5365d09b90 | 27 | wait(3.0); // 3 sec |
screamer | 0:005629fe3609 | 28 | } |
screamer | 0:005629fe3609 | 29 | } |