Program to demo the easyNeo class

Dependencies:   easyNeo mbed

Files at this revision

API Documentation at this revision

Comitter:
dannellyz
Date:
Sun Feb 15 22:34:11 2015 +0000
Parent:
0:8b36d99af4c3
Commit message:
round2

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Feb 15 21:32:19 2015 +0000
+++ b/main.cpp	Sun Feb 15 22:34:11 2015 +0000
@@ -14,21 +14,51 @@
     //green = 00FF00
     //blue = 0000FF
     //off = 000000
+    
     while (1) {
+        
+        //Clear all data from LEDs to help reduce collisions
         neoTest.clear();
+        //Runs through a test of all lights and colors
         neoTest.lightTest();
         wait(1);
         neoTest.clear();
+        //Coding example of how to set only the first
+        //Light in a strand of three:
+        //to red...
         neoTest.setByHex("FF0000000000000000");
         wait(1);
         neoTest.clear();
+        //to blue..
         neoTest.setByHex("0000000000FF000000");
         wait(1);
         neoTest.clear();
+        //to green..
         neoTest.setByHex("00000000000000FF00");
         wait(1);
         neoTest.clear();
         
+        //To add additional lights add antoher set of 6 hex charatcers 
+        //corresponding to the desired setting.
+        //Dont forgot to change delared class to add additional lights
+        //Here are the above examples having the forth light mimic the color.
+        /*
+        easyNeo neoTest2(4);
+        //to red...
+        neoTest2.setByHex("FF0000000000000000FF0000");
+        wait(1);
+        neoTest2.clear();
+        //to green..
+        neoTest2.setByHex("0000000000FF0000000000FF");
+        wait(1);
+        neoTest2.clear();
+        //to blue..
+        neoTest2.setByHex("00000000000000FF0000FF00");
+        wait(1);
+        neoTest.clear();
+        */
+        
+        
         
     }
 }
\ No newline at end of file