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@3:a420ee3bbe5c, 2017-01-11 (annotated)
- Committer:
- bbi22
- Date:
- Wed Jan 11 19:26:28 2017 +0000
- Revision:
- 3:a420ee3bbe5c
- Parent:
- 2:891e0c33df62
With terminal
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}; |
| bbi22 | 3:a420ee3bbe5c | 4 | Serial pc(USBTX, USBRX); |
| simon | 0:fb6bbc10ffa0 | 5 | |
| simon | 0:fb6bbc10ffa0 | 6 | int main() { |
| simon | 0:fb6bbc10ffa0 | 7 | while(1) { |
| bbi22 | 2:891e0c33df62 | 8 | for(int i = 0 ; i < 4 ; i++) |
| bbi22 | 2:891e0c33df62 | 9 | myleds[i] = 1; |
| bbi22 | 3:a420ee3bbe5c | 10 | pc.printf("Allume!\r\n"); |
| simon | 0:fb6bbc10ffa0 | 11 | wait(0.2); |
| bbi22 | 2:891e0c33df62 | 12 | for(int i = 0 ; i < 4 ; i++) |
| bbi22 | 2:891e0c33df62 | 13 | myleds[i] = 0; |
| bbi22 | 3:a420ee3bbe5c | 14 | pc.printf("Ferme!\r\n"); |
| simon | 0:fb6bbc10ffa0 | 15 | wait(0.2); |
| simon | 0:fb6bbc10ffa0 | 16 | } |
| simon | 0:fb6bbc10ffa0 | 17 | } |
