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.
Fork of HelloWorld by
Revision 2:7c55264e0187, committed 2016-12-01
- Comitter:
- ashchitragar
- Date:
- Thu Dec 01 08:29:50 2016 +0000
- Parent:
- 1:03c191369089
- Commit message:
- pin
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Jan 01 20:57:57 2012 +0000 +++ b/main.cpp Thu Dec 01 08:29:50 2016 +0000 @@ -1,12 +1,23 @@ #include "mbed.h" - -DigitalOut myled(LED1); - + +DigitalOut pin(LED2); + int main() { - while(1) { - myled = 1; - wait(0.2); - myled = 0; + // do something... + + // flash 5 times + for(int i=0; i<10; i++) { + pin = !pin; wait(0.2); } -} + + // do something else + + // flash 2 times + for(int i=0; i<4; i++) { + pin = !pin; + wait(0.2); + } + + // do another thing +} \ No newline at end of file