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@1:b6a407375dcc, 2014-03-29 (annotated)
- Committer:
- ManuelJoaquim
- Date:
- Sat Mar 29 20:52:34 2014 +0000
- Revision:
- 1:b6a407375dcc
- Parent:
- 0:870b78bb0e3d
- Child:
- 2:d4cec5b8d032
ledtest
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ManuelJoaquim | 0:870b78bb0e3d | 1 | #include "mbed.h" |
| ManuelJoaquim | 0:870b78bb0e3d | 2 | |
| ManuelJoaquim | 0:870b78bb0e3d | 3 | DigitalOut myled(LED1); |
| ManuelJoaquim | 0:870b78bb0e3d | 4 | |
| ManuelJoaquim | 0:870b78bb0e3d | 5 | int main() |
| ManuelJoaquim | 0:870b78bb0e3d | 6 | { |
| ManuelJoaquim | 0:870b78bb0e3d | 7 | while(1) { |
| ManuelJoaquim | 0:870b78bb0e3d | 8 | myled = 1; // LED is ON |
| ManuelJoaquim | 1:b6a407375dcc | 9 | wait(0.2); // 1000ms |
| ManuelJoaquim | 0:870b78bb0e3d | 10 | myled = 0; // LED is OFF |
| ManuelJoaquim | 0:870b78bb0e3d | 11 | wait(1.0); // 1 sec |
| ManuelJoaquim | 0:870b78bb0e3d | 12 | } |
| ManuelJoaquim | 0:870b78bb0e3d | 13 | } |