Spidey Wall is the name for a physical wall lit up by multiple addressable LED strips. This program is an LPC1768 web server to control the wall from a browser.

Dependencies:   EthernetInterfacePlusHostname RdWebServer mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers colourconverters.h Source File

colourconverters.h

00001 #ifndef COLOURCONVERTERS__H
00002 #define COLOURCONVERTERS__H
00003 
00004 typedef struct RgbColor
00005 {
00006     unsigned char r;
00007     unsigned char g;
00008     unsigned char b;
00009     
00010     RgbColor(int inr, int ing, int inb)
00011     {
00012         r = (unsigned char) inr;
00013         g = (unsigned char) ing;
00014         b = (unsigned char) inb;
00015     }
00016 } RgbColor;
00017 
00018 typedef struct HsvColor
00019 {
00020     unsigned char h;
00021     unsigned char s;
00022     unsigned char v;
00023 
00024     HsvColor(int inh, int ins, int inv)
00025     {
00026         h = (unsigned char) inh;
00027         s = (unsigned char) ins;
00028         v = (unsigned char) inv;
00029     }
00030 
00031 } HsvColor;
00032 
00033 void HsvToRgb(HsvColor hsv, RgbColor& rgb);
00034 
00035 void RgbToHsv(RgbColor rgb, HsvColor& hsv);
00036 
00037 #endif