This project involves wiring up an 8x8 LED Matrix to a WeMos Mini D1, and then serving a simple web-application from it.
Point your browser at the IP address of the device and you can interactively use the pixel-editor application to update the display in real-time. There are a couple of default images wired in which you can setup too.
The final output will look something like this:
The hardware for this project is simple:
- 1 x WeMos Mini D1
- Approximately cost €2.50.
- 1 x 8x8 LED Matrix
- Approximate cost €2.50.
Wiring the merely consists of connecting the display to the Mini D1 board, which is in turn powered by a simple USB-PSU:
- Vcc -> Vcc
- Group -> Ground
- SCL -> WeMos D1 D1
- SDA -> WeMos D1 D2
Left-click to set a pixel, right-click to clear one.
If you've previously configured WiFi details the device will connect automatically, and begin serving the application over HTTP.
If you've never configured the device it will instead notice that, and configure itself as an access-point. This means you can use your mobile phone, or other WiFi-connected device, to connect to this access-point and choose the local access-point it should become a member of.
Once configured the system will:
- Serve a simple web page via HTTP
- Respond to requests to update the LED matrix.
Several libraries are used, and these are bundled together in a git repository, you can access all the source by cloning the repo involved, and then looking at the project:
In short though the code is pretty simple, the only real magic is that it responds to requests of the form:
These numbers are binary numbers representing which of the eight LEDs on each row should be turned on - so
128is the left-most value,
1is the right-most pixel in the given row, etc.