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.
Dependencies: mbed
Fork of HelloWorld by
main.cpp@2:891e0c33df62, 2017-01-11 (annotated)
- Committer:
- bbi22
- Date:
- Wed Jan 11 18:59:43 2017 +0000
- Revision:
- 2:891e0c33df62
- Parent:
- 0:fb6bbc10ffa0
- Child:
- 3:a420ee3bbe5c
Flash 4 led
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| simon | 0:fb6bbc10ffa0 | 1 | #include "mbed.h" |
| simon | 0:fb6bbc10ffa0 | 2 | |
| bbi22 | 2:891e0c33df62 | 3 | DigitalOut myleds [] = {LED1, LED2, LED3, LED4}; |
| simon | 0:fb6bbc10ffa0 | 4 | |
| simon | 0:fb6bbc10ffa0 | 5 | int main() { |
| simon | 0:fb6bbc10ffa0 | 6 | while(1) { |
| bbi22 | 2:891e0c33df62 | 7 | for(int i = 0 ; i < 4 ; i++) |
| bbi22 | 2:891e0c33df62 | 8 | myleds[i] = 1; |
| simon | 0:fb6bbc10ffa0 | 9 | wait(0.2); |
| bbi22 | 2:891e0c33df62 | 10 | for(int i = 0 ; i < 4 ; i++) |
| bbi22 | 2:891e0c33df62 | 11 | myleds[i] = 0; |
| simon | 0:fb6bbc10ffa0 | 12 | wait(0.2); |
| simon | 0:fb6bbc10ffa0 | 13 | } |
| simon | 0:fb6bbc10ffa0 | 14 | } |
