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.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 2:bfe32024e001
- Parent:
- 1:dbcb74ecd5b0
- Child:
- 3:f652c4b6b709
--- a/main.cpp	Fri Feb 06 02:45:29 2015 +0000
+++ b/main.cpp	Sun Feb 08 15:13:09 2015 +0000
@@ -15,7 +15,7 @@
         
         //Initialze randomness
         srand(time(NULL));
-        //Define the random sequence of leds length 10
+        //Define the random sequence of leds length 10 (Either 0, 1, or 2)
         int a = (rand()%3);
         int b = (rand()%3);
         int c = (rand()%3);
@@ -33,10 +33,10 @@
 
     while(1) {
         
-        timer.start();
-        //ensure only loop once
+        timer.start();    //start timer
+        //ensure only loop once (18 seconds)
         while(timer.read() < 18){
-            //Loop through pattern 
+            //Loop through random patter defined at startup
             for(int i = 0; i < 10; i+= 1){
                 switch(pattern[i])
                     {
@@ -58,7 +58,6 @@
                     }
                 }
            }
-           
         timer.reset();        //reset timer
 
         }