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:c8af6bcf2c0c, 2017-05-26 (annotated)
- Committer:
- newhepta
- Date:
- Fri May 26 03:28:27 2017 +0000
- Revision:
- 0:c8af6bcf2c0c
test3
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| newhepta | 0:c8af6bcf2c0c | 1 | #include "mbed.h" |
| newhepta | 0:c8af6bcf2c0c | 2 | |
| newhepta | 0:c8af6bcf2c0c | 3 | DigitalOut led[] = {LED1,LED2,LED3,LED4}; |
| newhepta | 0:c8af6bcf2c0c | 4 | |
| newhepta | 0:c8af6bcf2c0c | 5 | int main() |
| newhepta | 0:c8af6bcf2c0c | 6 | { |
| newhepta | 0:c8af6bcf2c0c | 7 | int i,j; |
| newhepta | 0:c8af6bcf2c0c | 8 | while(1) |
| newhepta | 0:c8af6bcf2c0c | 9 | { |
| newhepta | 0:c8af6bcf2c0c | 10 | for(i=0;i<4;i++) |
| newhepta | 0:c8af6bcf2c0c | 11 | { |
| newhepta | 0:c8af6bcf2c0c | 12 | led[i] = 1; |
| newhepta | 0:c8af6bcf2c0c | 13 | wait(0.5); |
| newhepta | 0:c8af6bcf2c0c | 14 | }//for(i) |
| newhepta | 0:c8af6bcf2c0c | 15 | for(j=0;j<4;j++) |
| newhepta | 0:c8af6bcf2c0c | 16 | { |
| newhepta | 0:c8af6bcf2c0c | 17 | led[j] = 0; |
| newhepta | 0:c8af6bcf2c0c | 18 | wait(0.5); |
| newhepta | 0:c8af6bcf2c0c | 19 | }//for(j) |
| newhepta | 0:c8af6bcf2c0c | 20 | }//while |
| newhepta | 0:c8af6bcf2c0c | 21 | }//main |