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.
Fork of Bootcamp-HelloWorld_LED by
Diff: main.cpp
- Revision:
- 2:d243c01512ab
- Parent:
- 0:fb6bbc10ffa0
- Child:
- 3:997ae35e2cee
--- a/main.cpp Sun Jan 01 20:57:57 2012 +0000
+++ b/main.cpp Tue Apr 16 06:45:41 2013 +0000
@@ -1,12 +1,25 @@
-#include "mbed.h"
-
-DigitalOut myled(LED1);
-
-int main() {
- while(1) {
- myled = 1;
- wait(0.2);
- myled = 0;
- wait(0.2);
- }
-}
+
+#include "mbed.h"
+
+DigitalOut red(LED1);
+DigitalOut green(LED2);
+DigitalOut blue(LED3);
+
+int main() {
+ while(1){
+ red = 1;
+ green = blue = 0;
+ wait(0.2);
+
+ // green
+ green = 1;
+ red = blue = 0;
+ wait(0.2);
+
+ // blue
+ blue = 1;
+ red = green = 0;
+ wait(0.2);
+ }
+}
+
