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
led.cpp
- Committer:
- JelleRaes
- Date:
- 2018-03-13
- Revision:
- 2:067142778937
- Parent:
- 0:52e944ca21ea
- Child:
- 3:9c600fb19ed2
File content as of revision 2:067142778937:
#include "mbed.h"
#include <string.h>
#include "led.h"
Serial pc3(USBTX, USBRX);
led::led(void)
{
/**
colors[].name = "";
colors[].redValue = ;
colors[].greenValue = ;
colors[].blueValue = ;
*/
count =6;
colors[0].name= "red";
colors[0].redValue = 0.0;
colors[0].greenValue = 1.0;
colors[0].blueValue = 1.0;
colors[1].name= "green";
colors[1].redValue = 1.0;
colors[1].greenValue = 0.0;
colors[1].blueValue = 1.0;
colors[2].name= "blue";
colors[2].redValue = 1.0;
colors[2].greenValue = 1.0;
colors[2].blueValue = 0.0;
colors[3].name= "black";
colors[3].redValue = 1.0;
colors[3].greenValue = 1.0;
colors[3].blueValue = 1.0;
colors[4].name= "white";
colors[4].redValue = 0.0;
colors[4].greenValue = 0.0;
colors[4].blueValue = 0.0;
colors[5].name = "yellow";
colors[5].redValue = 0.0;
colors[5].greenValue = 0.0;
colors[5].blueValue = 1.0;
}
led::COLOR led::getCOLOR(char *n){
led::COLOR temp;
for(int i=0;i<count;i++){
if(strcmp(colors[i].name,n) ==0)
temp=colors[i];}
return temp;
}
