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.
Diff: main.cpp
- Revision:
- 1:b2c101c6224c
- Parent:
- 0:5ffd51019d11
diff -r 5ffd51019d11 -r b2c101c6224c main.cpp
--- a/main.cpp Mon Oct 14 03:52:09 2013 +0000
+++ b/main.cpp Mon Oct 14 03:55:38 2013 +0000
@@ -8,9 +8,9 @@
// ALL OFF - 4 seconds
-#define OFF 1
-#define ON 0
-#define TIME 1
+#define OFF 1
+#define ON 0
+#define TIME 1
DigitalOut myled_blue(LED1);
DigitalOut myled_green(LED2);
@@ -18,25 +18,26 @@
void all_off(void);
void all_on(void);
-int main() {
+int main()
+{
while(1) {
all_off();
myled_green = ON;
wait(TIME);
all_off();
-
+
myled_blue = ON;
wait(TIME);
all_off();
-
+
myled_red = ON;
wait(TIME);
all_off();
-
+
all_on(); //WHITE
wait(TIME);
all_off();
-
+
wait(TIME*4);
}
}
@@ -45,12 +46,12 @@
{
myled_green = OFF;
myled_blue = OFF;
- myled_red = OFF;
+ myled_red = OFF;
}
void all_on(void)
{
myled_green = ON;
myled_blue = ON;
- myled_red = ON;
+ myled_red = ON;
}