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.
Fork of Nucleo_blink_led by
main.cpp@0:c4ef4204ae76, 2015-04-23 (annotated)
- Committer:
- vjwramasamy
- Date:
- Thu Apr 23 17:26:08 2015 +0000
- Revision:
- 0:c4ef4204ae76
- Child:
- 1:08f0b72c9643
changed
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| vjwramasamy | 0:c4ef4204ae76 | 1 | #include "mbed.h" |
| vjwramasamy | 0:c4ef4204ae76 | 2 | |
| vjwramasamy | 0:c4ef4204ae76 | 3 | DigitalOut myled(LED1); |
| vjwramasamy | 0:c4ef4204ae76 | 4 | unsigned char i; |
| vjwramasamy | 0:c4ef4204ae76 | 5 | |
| vjwramasamy | 0:c4ef4204ae76 | 6 | int main() |
| vjwramasamy | 0:c4ef4204ae76 | 7 | { |
| vjwramasamy | 0:c4ef4204ae76 | 8 | while(1) { |
| vjwramasamy | 0:c4ef4204ae76 | 9 | myled = 1; // LED is ON |
| vjwramasamy | 0:c4ef4204ae76 | 10 | wait_ms(i); // in ms |
| vjwramasamy | 0:c4ef4204ae76 | 11 | myled = 0; // LED is OFF |
| vjwramasamy | 0:c4ef4204ae76 | 12 | wait_ms(i); // in ms |
| vjwramasamy | 0:c4ef4204ae76 | 13 | //wait(0.2); // 200 msec |
| vjwramasamy | 0:c4ef4204ae76 | 14 | i=i++; |
| vjwramasamy | 0:c4ef4204ae76 | 15 | } |
| vjwramasamy | 0:c4ef4204ae76 | 16 | } |
