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:211a15a2175f, 2015-12-18 (annotated)
- Committer:
- sebig
- Date:
- Fri Dec 18 11:38:14 2015 +0000
- Revision:
- 0:211a15a2175f
- Child:
- 1:17772f9c7412
test LED
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sebig | 0:211a15a2175f | 1 | #include "mbed.h" |
sebig | 0:211a15a2175f | 2 | |
sebig | 0:211a15a2175f | 3 | DigitalOut myled(LED1); |
sebig | 0:211a15a2175f | 4 | DigitalOut myled2(LED2); |
sebig | 0:211a15a2175f | 5 | |
sebig | 0:211a15a2175f | 6 | int main() { |
sebig | 0:211a15a2175f | 7 | while(1) { |
sebig | 0:211a15a2175f | 8 | myled = 1; // LED1 is ON |
sebig | 0:211a15a2175f | 9 | myled2 = 0; // LED2 is OFF |
sebig | 0:211a15a2175f | 10 | wait(0.5); // 500 ms |
sebig | 0:211a15a2175f | 11 | myled = 0; // LED1 is OFF |
sebig | 0:211a15a2175f | 12 | myled2 = 1; // LED2 is ON |
sebig | 0:211a15a2175f | 13 | wait(0.5); // 500ms |
sebig | 0:211a15a2175f | 14 | } |
sebig | 0:211a15a2175f | 15 | } |