There is a web interface on http://10.1.0.181 to control everything.
There is also an API: send an HTTP POST request to http://10.1.0.181 with the following plaintext body:
COMMAND [command opts ...]
Commands:
ScrollingText <text>
ClearDisplay
Example:
$ echo "ScrollingText Welkom in de kelder!" | http POST 10.1.0.181
- ESP8266 aka Servy: handles outside communication
- Arduino Uno: controlling the LEDS
- 12x MAX7219 Led display (8x8 leds)
- Wired like this (source: the internet):
- The LedControl library can only handle 8 displays chained. We have 12 displays. 4 chains of each 3 displays. Displays are chained on the same bus, more displays on the same bus causes slow text scrolling. This is the reason they are split into 4 different busses with each only 3 displays.
- To set or unset leds on the display:
setLed(..., bool state)
sets one led on or offsetRow(..., byte value)
sets a row of 8 leds, each led i on or off depending on the bit i of thevalue
-bytesetColumn
, analogous to the above
- Each character is stored as 8 bytes resulting in an 8 by 8 grid of bits
- We do some weird 'transposing' of the text string, so that the list of bytes to display are columns when looking at the led displays. To display what we call a sliding window, we just have to send the correct columns to the displays.
- The font is originally from Marcel Sondaar, public domain, made available here
- IP: 10.1.0.181
- Running MicroPython
- Write files to microcontroller.
boot.py
andmain.py
are executed on boot.- Connected through serial with
ampy
:$ ampy -p /dev/ttyUSB0 -b 115200 put main.py main.py # Or directly run file while developing $ ampy -p /dev/ttyUSB0 -b 115200 run main.py
- Use the WebREPL in
servy/webrepl/webrepl.html
(submodule) to update or execute code on Servy. Connect withws://10.1.0.181:8266
. password =led=demax
- Connected through serial with
- Arduino IDE
- Dependencies:
- Modified version of LedControl by Eberhard Fahle [email protected] v1.0.6. The files are included in this repository.