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 1:407c746d1be7, committed 2016-12-01
- Comitter:
- zishan2627
- Date:
- Thu Dec 01 07:48:23 2016 +0000
- Parent:
- 0:d8027a997a6e
- Commit message:
- zishan
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r d8027a997a6e -r 407c746d1be7 main.cpp --- a/main.cpp Thu Dec 01 07:45:56 2016 +0000 +++ b/main.cpp Thu Dec 01 07:48:23 2016 +0000 @@ -1,12 +1,21 @@ #include "mbed.h" - -DigitalOut myled(LED1); - + +DigitalOut pin(LED2); + int main() { - while(1) { - myled = 1; + // do something... + + // flash 5 times + for(int i=0; i<10; i++) { + pin = !pin; wait(0.2); - myled = 0; + } + + // do something else + + // flash 2 times + for(int i=0; i<4; i++) { + pin = !pin; wait(0.2); } }