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:6c9e433eb175, 2010-10-12 (annotated)
- Committer:
- nothing
- Date:
- Tue Oct 12 17:47:39 2010 +0000
- Revision:
- 0:6c9e433eb175
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| nothing | 0:6c9e433eb175 | 1 | #include "mbed.h" |
| nothing | 0:6c9e433eb175 | 2 | |
| nothing | 0:6c9e433eb175 | 3 | DigitalOut myled1(LED1); |
| nothing | 0:6c9e433eb175 | 4 | DigitalOut myled2(LED2); |
| nothing | 0:6c9e433eb175 | 5 | DigitalOut myled3(LED3); |
| nothing | 0:6c9e433eb175 | 6 | DigitalOut myled4(LED4); |
| nothing | 0:6c9e433eb175 | 7 | |
| nothing | 0:6c9e433eb175 | 8 | int counter; |
| nothing | 0:6c9e433eb175 | 9 | |
| nothing | 0:6c9e433eb175 | 10 | int main() { |
| nothing | 0:6c9e433eb175 | 11 | while (1) { |
| nothing | 0:6c9e433eb175 | 12 | |
| nothing | 0:6c9e433eb175 | 13 | for (counter = 1; counter < 16; ++counter) { |
| nothing | 0:6c9e433eb175 | 14 | myled1 = (counter & 1); |
| nothing | 0:6c9e433eb175 | 15 | myled2 = (counter & 2); |
| nothing | 0:6c9e433eb175 | 16 | myled3 = (counter & 4); |
| nothing | 0:6c9e433eb175 | 17 | myled4 = (counter & 8); |
| nothing | 0:6c9e433eb175 | 18 | wait(2); |
| nothing | 0:6c9e433eb175 | 19 | } |
| nothing | 0:6c9e433eb175 | 20 | } |
| nothing | 0:6c9e433eb175 | 21 | } |
| nothing | 0:6c9e433eb175 | 22 |