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 mbed_blinky by
Revision 15:55bfea63d6cd, committed 2016-12-29
- Comitter:
- wbqaston
- Date:
- Thu Dec 29 02:14:59 2016 +0000
- Parent:
- 14:981d248a8057
- Commit message:
- fg
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Oct 28 03:18:15 2016 +0000 +++ b/main.cpp Thu Dec 29 02:14:59 2016 +0000 @@ -1,12 +1,23 @@ #include "mbed.h" DigitalOut myled(LED1); +unsigned int sec=0,min,hour; -int main() { - while(1) { - myled = 1; - wait(0.2); - myled = 0; - wait(0.2); +int add(void); + +int main() +{ + while(1) + { + wait(1); + myled = !myled; + sec = sec+2; + + if(sec==60) + { + sec = 0; + } + + printf("sec = %d \n",sec); } }