Tim Johnson / Mbed 2 deprecated 4_LED_bounce

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
captaintim
Date:
Wed Dec 16 21:35:17 2015 +0000
Commit message:
The 4 LEDs are exercised by lighting one LED at a time moving in one direction until it reaches the end of the row then reversing.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r a97a819083e9 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Dec 16 21:35:17 2015 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+
+/*comments testing lighting of 4 LEDs bouncing*/
+
+int main() {
+int on = 1;
+int off = 0;
+while(1){
+
+ DigitalOut (LED1, on);
+ wait (.2);
+ 
+ DigitalOut (LED1, off);
+ DigitalOut (LED2, on);
+ wait (.2);
+ 
+ DigitalOut (LED2, off);
+ DigitalOut (LED3, on);
+ wait (.2);
+ 
+ DigitalOut (LED3, off);
+ DigitalOut (LED4, on);
+ wait (.2);
+ 
+ DigitalOut (LED4, off);
+ DigitalOut (LED3, on);
+ wait (.2);
+ 
+ DigitalOut (LED3, off);
+ DigitalOut (LED2, on);
+ wait (.2);
+ 
+ DigitalOut (LED2, off);
+  }
+}     
\ No newline at end of file
diff -r 000000000000 -r a97a819083e9 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Dec 16 21:35:17 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4336505e4b1c
\ No newline at end of file