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.
Revision 5:b7b6d69bb4c7, committed 2015-10-21
- Comitter:
- tamberg
- Date:
- Wed Oct 21 11:19:28 2015 +0000
- Parent:
- 4:6bb53ba19ca9
- Commit message:
- Changed to explicit write.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Oct 20 17:47:17 2015 +0000 +++ b/main.cpp Wed Oct 21 11:19:28 2015 +0000 @@ -1,14 +1,12 @@ #include "mbed.h" -#define OFF 0; -#define ON 1; DigitalOut led(D7); int main() { - while(1) { - led = ON; + while(1) { // loop + led.write(1); // on wait_ms(500); - led = OFF; + led.write(0); // off wait_ms(500); } } \ No newline at end of file