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@0:5e2067661d54, 2016-11-30 (annotated)
- Committer:
- akshay28
- Date:
- Wed Nov 30 08:20:17 2016 +0000
- Revision:
- 0:5e2067661d54
hello
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
akshay28 | 0:5e2067661d54 | 1 | #include "mbed.h" |
akshay28 | 0:5e2067661d54 | 2 | |
akshay28 | 0:5e2067661d54 | 3 | DigitalOut pin(LED2); |
akshay28 | 0:5e2067661d54 | 4 | |
akshay28 | 0:5e2067661d54 | 5 | int main() { |
akshay28 | 0:5e2067661d54 | 6 | // do something... |
akshay28 | 0:5e2067661d54 | 7 | |
akshay28 | 0:5e2067661d54 | 8 | // flash 5 times |
akshay28 | 0:5e2067661d54 | 9 | for(int i=0; i<10; i++) { |
akshay28 | 0:5e2067661d54 | 10 | pin = !pin; |
akshay28 | 0:5e2067661d54 | 11 | wait(0.2); |
akshay28 | 0:5e2067661d54 | 12 | } |
akshay28 | 0:5e2067661d54 | 13 | |
akshay28 | 0:5e2067661d54 | 14 | // do something else |
akshay28 | 0:5e2067661d54 | 15 | |
akshay28 | 0:5e2067661d54 | 16 | // flash 2 times |
akshay28 | 0:5e2067661d54 | 17 | for(int i=0; i<4; i++) { |
akshay28 | 0:5e2067661d54 | 18 | pin = !pin; |
akshay28 | 0:5e2067661d54 | 19 | wait(0.2); |
akshay28 | 0:5e2067661d54 | 20 | } |
akshay28 | 0:5e2067661d54 | 21 | |
akshay28 | 0:5e2067661d54 | 22 | // do another thing |
akshay28 | 0:5e2067661d54 | 23 | } |