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
This project is part of a Light-Wall using addressable LED strips (WS2801). I have published a few posts on my blog about the construction of the wall and building a game to play on it (PacMan). I have also had a guest post from a friend who has set his children the task of producing some interesting animations. The original post is http://robdobson.com/2015/07/spidey-wall/
So far, however, I hadn't fully connected the physical (and electronic) wall with the web-browser creations to drive it. This project is hopefully the final link. A fast and reliable web server using REST commands to drive the 1686 LEDs in the Spidey Wall from code running in a browser (say on an iPad while you are playing a game).
The approach taken here results in the ability to control the RGB values of all 1686 LEDs at a rate of 20 frames per second.
A blog post describing the whole thing is here:
http://robdobson.com/2015/08/a-reliable-mbed-webserver/
colourconverters.h@6:8df79fe1afcd, 2015-09-03 (annotated)
- Committer:
- Bobty
- Date:
- Thu Sep 03 20:17:23 2015 +0000
- Revision:
- 6:8df79fe1afcd
- Parent:
- 0:887096209439
Fixed an unforeseen problem with messages not aligned on RGB boundaries; Fixed potential hanging pointer problem in colourconverters; Changed Idle screen to a set of colourful snakes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Bobty | 0:887096209439 | 1 | #ifndef COLOURCONVERTERS__H |
Bobty | 0:887096209439 | 2 | #define COLOURCONVERTERS__H |
Bobty | 0:887096209439 | 3 | |
Bobty | 0:887096209439 | 4 | typedef struct RgbColor |
Bobty | 0:887096209439 | 5 | { |
Bobty | 0:887096209439 | 6 | unsigned char r; |
Bobty | 0:887096209439 | 7 | unsigned char g; |
Bobty | 0:887096209439 | 8 | unsigned char b; |
Bobty | 0:887096209439 | 9 | |
Bobty | 0:887096209439 | 10 | RgbColor(int inr, int ing, int inb) |
Bobty | 0:887096209439 | 11 | { |
Bobty | 0:887096209439 | 12 | r = (unsigned char) inr; |
Bobty | 0:887096209439 | 13 | g = (unsigned char) ing; |
Bobty | 0:887096209439 | 14 | b = (unsigned char) inb; |
Bobty | 0:887096209439 | 15 | } |
Bobty | 0:887096209439 | 16 | } RgbColor; |
Bobty | 0:887096209439 | 17 | |
Bobty | 0:887096209439 | 18 | typedef struct HsvColor |
Bobty | 0:887096209439 | 19 | { |
Bobty | 0:887096209439 | 20 | unsigned char h; |
Bobty | 0:887096209439 | 21 | unsigned char s; |
Bobty | 0:887096209439 | 22 | unsigned char v; |
Bobty | 0:887096209439 | 23 | |
Bobty | 0:887096209439 | 24 | HsvColor(int inh, int ins, int inv) |
Bobty | 0:887096209439 | 25 | { |
Bobty | 0:887096209439 | 26 | h = (unsigned char) inh; |
Bobty | 0:887096209439 | 27 | s = (unsigned char) ins; |
Bobty | 0:887096209439 | 28 | v = (unsigned char) inv; |
Bobty | 0:887096209439 | 29 | } |
Bobty | 0:887096209439 | 30 | |
Bobty | 0:887096209439 | 31 | } HsvColor; |
Bobty | 0:887096209439 | 32 | |
Bobty | 6:8df79fe1afcd | 33 | void HsvToRgb(HsvColor hsv, RgbColor& rgb); |
Bobty | 0:887096209439 | 34 | |
Bobty | 6:8df79fe1afcd | 35 | void RgbToHsv(RgbColor rgb, HsvColor& hsv); |
Bobty | 0:887096209439 | 36 | |
Bobty | 0:887096209439 | 37 | #endif |