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:17772f9c7412, 2015-12-22 (annotated)
- Committer:
- sebig
- Date:
- Tue Dec 22 09:41:43 2015 +0000
- Revision:
- 1:17772f9c7412
- Parent:
- 0:211a15a2175f
- Child:
- 2:ed41596bff69
200ms Test
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 | 1:17772f9c7412 | 3 | DigitalOut myled1(LED1); |
sebig | 0:211a15a2175f | 4 | DigitalOut myled2(LED2); |
sebig | 0:211a15a2175f | 5 | |
sebig | 1:17772f9c7412 | 6 | int main() |
sebig | 1:17772f9c7412 | 7 | { |
sebig | 0:211a15a2175f | 8 | while(1) { |
sebig | 1:17772f9c7412 | 9 | myled1 = 1; // LED1 is ON |
sebig | 0:211a15a2175f | 10 | myled2 = 0; // LED2 is OFF |
sebig | 1:17772f9c7412 | 11 | wait(1); // 200 ms |
sebig | 1:17772f9c7412 | 12 | myled1 = 0; // LED1 is OFF |
sebig | 0:211a15a2175f | 13 | myled2 = 1; // LED2 is ON |
sebig | 1:17772f9c7412 | 14 | wait(1); // 200ms |
sebig | 0:211a15a2175f | 15 | } |
sebig | 0:211a15a2175f | 16 | } |