Skip to content

Latest commit

 

History

History
59 lines (45 loc) · 2.51 KB

README.md

File metadata and controls

59 lines (45 loc) · 2.51 KB

LED DisplaY

Control LEDDY

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

Hardware

  • ESP8266 aka Servy: handles outside communication
  • Arduino Uno: controlling the LEDS
  • 12x MAX7219 Led display (8x8 leds)
  • Wired like this (source: the internet):

Notes on LED control implementation

  • 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 off
    • setRow(..., byte value) sets a row of 8 leds, each led i on or off depending on the bit i of the value-byte
    • setColumn, 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

Servy

  • IP: 10.1.0.181
  • Running MicroPython
  • Write files to microcontroller. boot.py and main.py are executed on boot.
    1. 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
    2. Use the WebREPL in servy/webrepl/webrepl.html (submodule) to update or execute code on Servy. Connect with ws://10.1.0.181:8266. password = led=demax

Development

  • Arduino IDE
  • Dependencies: