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:
- 0:52e944ca21ea
- Child:
- 2:067142778937
File content as of revision 0:52e944ca21ea:
#include "mbed.h"
#include <string.h>
#include "led.h"
Serial pc3(USBTX, USBRX);
led::led(void)
{
count =4;
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;
}
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;
}
