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:6d1bba714771, 2011-12-08 (annotated)
- Committer:
- agfi68
- Date:
- Thu Dec 08 05:58:47 2011 +0000
- Revision:
- 0:6d1bba714771
1.0
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| agfi68 | 0:6d1bba714771 | 1 | #include "mbed.h" |
| agfi68 | 0:6d1bba714771 | 2 | |
| agfi68 | 0:6d1bba714771 | 3 | BusOut myleds(LED1, LED2, LED3, LED4); |
| agfi68 | 0:6d1bba714771 | 4 | |
| agfi68 | 0:6d1bba714771 | 5 | int main() { |
| agfi68 | 0:6d1bba714771 | 6 | for (int i=15; i>0; i--) { |
| agfi68 | 0:6d1bba714771 | 7 | myleds = i; |
| agfi68 | 0:6d1bba714771 | 8 | wait(1.0); |
| agfi68 | 0:6d1bba714771 | 9 | } |
| agfi68 | 0:6d1bba714771 | 10 | myleds = 0; |
| agfi68 | 0:6d1bba714771 | 11 | while (1) { |
| agfi68 | 0:6d1bba714771 | 12 | wait(0.2); |
| agfi68 | 0:6d1bba714771 | 13 | myleds = 15 - myleds; |
| agfi68 | 0:6d1bba714771 | 14 | } |
| agfi68 | 0:6d1bba714771 | 15 | } |