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: EthernetInterface LM75B mbed-rtos mbed
Fork of communication by
Diff: led.cpp
- Revision:
- 3:9c600fb19ed2
- Parent:
- 2:067142778937
- Child:
- 4:4848f847d2ce
diff -r 067142778937 -r 9c600fb19ed2 led.cpp
--- 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
