The 4 LEDs are exercised one at a time moving one way then the other at the end of the row.

Dependencies:   mbed

Revision:
0:a97a819083e9
--- /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