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/ /media/uploads/Bobty/20130722_112945_img_9674_62895-1184x1579.jpg

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/

Committer:
Bobty
Date:
Mon Aug 31 09:03:15 2015 +0000
Revision:
3:e5ea80fae61d
Parent:
1:362331cec9b7
Child:
4:b521815f2657
Made ShowLeds an explicit command rather than automatic; Allow hostname to be set; Made sure HTTP response has keep-alive in it; Moved http_server into main loop (was in a separate thread); Added HSV fill command

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Bobty 0:887096209439 1 #ifndef LEDSTRIP__H
Bobty 0:887096209439 2 #define LEDSTRIP__H
Bobty 0:887096209439 3
Bobty 0:887096209439 4 #include "mbed.h"
Bobty 0:887096209439 5
Bobty 0:887096209439 6 class ledstrip
Bobty 0:887096209439 7 {
Bobty 0:887096209439 8 private:
Bobty 0:887096209439 9 unsigned char* mpLedValuesA;
Bobty 0:887096209439 10 unsigned char* mpLedValuesB;
Bobty 0:887096209439 11 unsigned char* mpCurLedValues;
Bobty 0:887096209439 12 int mLedsInStrip;
Bobty 0:887096209439 13 int mSplitPoint;
Bobty 0:887096209439 14 int mLedsBufSize;
Bobty 0:887096209439 15 SPI* mpSPI0;
Bobty 0:887096209439 16 SPI* mpSPI1;
Bobty 0:887096209439 17
Bobty 0:887096209439 18 public:
Bobty 0:887096209439 19 static const int mColoursPerLed = 3;
Bobty 0:887096209439 20
Bobty 0:887096209439 21 public:
Bobty 0:887096209439 22 ledstrip(int length, int splitPoint);
Bobty 0:887096209439 23 ~ledstrip();
Bobty 0:887096209439 24 unsigned char* GetBuffer();
Bobty 0:887096209439 25 int GetBufferSizeinBytes();
Bobty 0:887096209439 26 bool Resize(int length, int splitPoint);
Bobty 0:887096209439 27 bool IsBusy();
Bobty 0:887096209439 28 int GetNumLeds()
Bobty 0:887096209439 29 {
Bobty 0:887096209439 30 return mLedsInStrip;
Bobty 0:887096209439 31 }
Bobty 0:887096209439 32 void Clear();
Bobty 1:362331cec9b7 33 void RawFill(int startLed, int numLeds, const unsigned char* pLedVals);
Bobty 3:e5ea80fae61d 34 void HsvFill(int startLed, int numLeds, const unsigned char* pLedVals);
Bobty 0:887096209439 35 void Fill(int startLed, int numLeds,
Bobty 0:887096209439 36 int r1, int g1, int b1,
Bobty 0:887096209439 37 int r2, int g2, int b2);
Bobty 0:887096209439 38 void Fill(int startLed, int numLeds,
Bobty 0:887096209439 39 int r1, int g1, int b1);
Bobty 0:887096209439 40 void ShowLeds();
Bobty 0:887096209439 41
Bobty 0:887096209439 42 };
Bobty 0:887096209439 43
Bobty 0:887096209439 44 #endif