Jelle Raes / Mbed 2 deprecated Projec_1_projectlab

Dependencies:   EthernetInterface LM75B mbed-rtos mbed

Fork of communication by Jelle Raes

Revision:
3:9c600fb19ed2
Parent:
2:067142778937
Child:
4:4848f847d2ce
--- a/led.cpp	Tue Mar 13 12:15:05 2018 +0000
+++ b/led.cpp	Wed Mar 14 14:39:08 2018 +0000
@@ -12,7 +12,7 @@
 colors[].blueValue = ;
 */    
     
-    count =6;
+    count =10;
     colors[0].name= "red";
     colors[0].redValue = 0.0;
     colors[0].greenValue = 1.0;
@@ -42,13 +42,35 @@
     colors[5].redValue = 0.0;
     colors[5].greenValue = 0.0;
     colors[5].blueValue = 1.0;
+    
+    colors[6].name = "magenta";
+    colors[6].redValue = 0.0;
+    colors[6].greenValue = 1.0;
+    colors[6].blueValue = 0.0;
+    
+    colors[7].name = "cyan";
+    colors[7].redValue = 1.0;
+    colors[7].greenValue = 0.0;
+    colors[7].blueValue = 0.0;
+    
+    colors[8].name = "purple";
+    colors[8].redValue = 0.498;
+    colors[8].greenValue = 1.0;
+    colors[8].blueValue = 0.498;
+    
+    colors[9].name = "brown";
+    colors[9].redValue = 0.353;
+    colors[9].greenValue = 0.835;
+    colors[9].blueValue = 0.835;
 }
 
                 
 led::COLOR led::getCOLOR(char *n){
-    led::COLOR temp;
+    //led::COLOR temp;
     for(int i=0;i<count;i++){
             if(strcmp(colors[i].name,n) ==0)
-            temp=colors[i];}
-    return temp;
+            n ="found";
+            return colors[i];}
+    //return temp;
+    n = "failed";
 }
\ No newline at end of file