Dimming the leds one by one. After each led is fully lit it will go out, the next will start ligthing up.

Dependencies:   mbed

Revision:
1:20d55e2596f5
Parent:
0:a5c8d616b253
diff -r a5c8d616b253 -r 20d55e2596f5 main.cpp
--- a/main.cpp	Tue Oct 12 19:24:07 2010 +0000
+++ b/main.cpp	Tue Oct 12 19:25:38 2010 +0000
@@ -63,45 +63,9 @@
                  rate4=0;
                 
         
-        
-     /*    for (unsigned char rate3=0; rate<=255; rate3++)
-        {
-         led[ 1 ]    = rate3 / 255.0;
-      //   wait( 0.01 );
-        }
-        
-         for (unsigned char rate4=0; rate<=255; rate4++)
-        {
-         led[ 3 ]    = rate4 / 255.0;
-       //  wait( 0.01 );
-        }
-        
-               
-      //  led[ 2 ]    = rate / 255.0;
-     ////   led[ 1 ]    = 1- (rate / 255.0);
-     //   led[ 3 ]    = 1- (rate / 255.0);
-    //    rate++;
-        
-    */    wait( 0.01 );
+   
+       wait( 0.01 );
     }
 }
 
-#if 0
-     //   for ( int i = 0, r = rate; i < 4; i++, r += 32 )
-       //     led[ i ]    = ((r  &  0x80) ? (unsigned char)(~r) : (unsigned char)r) / 255.0;
-        
-        rate += 4;
-        
-        wait( 0.01 );
-#endif
-/*
-#if 0
-        led[ 0 ]    = (unsigned char)rate / 255.0;
-        led[ 2 ]    = (unsigned char)rate / 255.0;
-        led[ 1 ]    = 1- ((unsigned char)rate / 255.0);
-        led[ 3 ]    = 1- ((unsigned char)rate / 255.0);
-        rate++;
-        
-        wait( 0.01 );
-#endif
-*/
+