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
Diff: main.cpp
- Revision:
- 2:891e0c33df62
- Parent:
- 0:fb6bbc10ffa0
- Child:
- 3:a420ee3bbe5c
--- a/main.cpp Sun Jan 01 20:57:57 2012 +0000
+++ b/main.cpp Wed Jan 11 18:59:43 2017 +0000
@@ -1,12 +1,14 @@
#include "mbed.h"
-DigitalOut myled(LED1);
+DigitalOut myleds [] = {LED1, LED2, LED3, LED4};
int main() {
while(1) {
- myled = 1;
+ for(int i = 0 ; i < 4 ; i++)
+ myleds[i] = 1;
wait(0.2);
- myled = 0;
+ for(int i = 0 ; i < 4 ; i++)
+ myleds[i] = 0;
wait(0.2);
}
}
