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.
Revision 1:b2c101c6224c, committed 2013-10-14
- Comitter:
- thiagolima
- Date:
- Mon Oct 14 03:55:38 2013 +0000
- Parent:
- 0:5ffd51019d11
- Commit message:
- The following sequence is tested on the LPC800 MAX dev board:
; GREEN LED - 1 second
; BLUE LED - 1 second
; RED LED - 1 second
; WHITE LED - 1 second
; ALL LEDS OFF - 4 seconds
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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;
}