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/
DrawingManager.h@6:8df79fe1afcd, 2015-09-03 (annotated)
- Committer:
- Bobty
- Date:
- Thu Sep 03 20:17:23 2015 +0000
- Revision:
- 6:8df79fe1afcd
- Parent:
- 5:910909f34907
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 | 1:362331cec9b7 | 1 | #ifndef DRAWING_MANAGER |
Bobty | 1:362331cec9b7 | 2 | #define DRAWING_MANAGER |
Bobty | 1:362331cec9b7 | 3 | |
Bobty | 4:b521815f2657 | 4 | // |
Bobty | 4:b521815f2657 | 5 | // Drawing Manager for LightWall |
Bobty | 4:b521815f2657 | 6 | // Rob Dobson 2015 |
Bobty | 4:b521815f2657 | 7 | // |
Bobty | 4:b521815f2657 | 8 | |
Bobty | 1:362331cec9b7 | 9 | #include "mbed.h" |
Bobty | 1:362331cec9b7 | 10 | #include "ledstrip.h" |
Bobty | 1:362331cec9b7 | 11 | |
Bobty | 1:362331cec9b7 | 12 | class DrawingManager |
Bobty | 1:362331cec9b7 | 13 | { |
Bobty | 1:362331cec9b7 | 14 | public: |
Bobty | 2:99eb4c6e9ea4 | 15 | DrawingManager(); |
Bobty | 4:b521815f2657 | 16 | void Init(int numLeds, int splitPoint); |
Bobty | 4:b521815f2657 | 17 | void Clear(); |
Bobty | 4:b521815f2657 | 18 | void RawFill(char* args, unsigned char* payload, int payloadLen, int payloadOffset); |
Bobty | 4:b521815f2657 | 19 | void Fill(char* args); |
Bobty | 4:b521815f2657 | 20 | void ShowLeds(); |
Bobty | 5:910909f34907 | 21 | void DisplayIdle(unsigned int stepCount); |
Bobty | 1:362331cec9b7 | 22 | |
Bobty | 1:362331cec9b7 | 23 | private: |
Bobty | 1:362331cec9b7 | 24 | ledstrip* pLedStrip; |
Bobty | 1:362331cec9b7 | 25 | bool isBusy; |
Bobty | 4:b521815f2657 | 26 | int GetIntFromNameValPair(char* buf, char* name, int invalidVal); |
Bobty | 6:8df79fe1afcd | 27 | unsigned char pRawFillPayloadOverhang[2]; |
Bobty | 6:8df79fe1afcd | 28 | int rawFillPayloadOverhangBytes; |
Bobty | 1:362331cec9b7 | 29 | }; |
Bobty | 1:362331cec9b7 | 30 | |
Bobty | 1:362331cec9b7 | 31 | #endif |