Minotor

LEDuino: the Arduino firmware Minotor sends its frames to

October 2026 · minotor.org

Minotor never drove a pixel itself. It rendered each frame on the computer and wrote it to a serial port, where an Arduino Mega 2560 running LEDuino turned the bytes into SPI data for the LEDs. LEDuino lives in its own repository, github.com/minotor-org/leduino, and consists of one commit by Romuald Conty from 30 September 2013 with three files in it: the sketch leduino.ino, a gamma table in gamma.h and a short README. The repository carries no licence file, so this page describes the code without copying it.

The old wiki never documented the link between the two programs. Everything below is read from both ends of it: Core/ledmatrix.cpp in Minotor's final commit (9251ecf, February 2017) and the sketch. We have neither run LEDuino on hardware nor compiled it, and the sections where that matters say so.

What goes over the USB cable

ItemValueWhere it comes from
Speed1,000,000 baudMinotor opens the port at QExtSerialPort's BAUD1000000. LEDuino programs the ATmega2560's first USART for the same rate in double speed mode.
Frame size3 bytes per pixel: 1,152 for the 24 × 16 wallMinotor's matrix settings, and four size constants in the sketch
Byte order in a pixelblue, red, greenBoth ends agree on it in code
End of framea single byte, 0x01Written by Minotor after every frame
A channel value of exactly 1sent as 0Keeps 0x01 free to mean end of frame
Directioncomputer to Arduino onlyMinotor opens the port write only and never reads a reply

There is no header, checksum or handshake. The Arduino files incoming bytes into its buffer in order and jumps back to the start whenever 0x01 arrives, which is what brings the two sides back into step after a lost byte.

The frame rate follows the tempo. Minotor animates the program on air and pushes it to the matrix on every second MIDI clock tick, which makes 12 frames per beat. With the internal clock at its default 124 BPM that comes to 24.8 frames per second, and a 174 BPM drum and bass set gets 34.8. A frame and its end byte are 1,153 bytes. Serial framing spends 10 bits on each byte, so the link moves 100,000 bytes a second and would only become the limit above about 86 frames per second, roughly 430 BPM. A comment in the sketch reports around 75 frames per second for the Arduino's own output to 384 WS2801 pixels.

Pixel order on the wall

Minotor draws a plain image, row by row from the top left, then reorders it into wiring order through a lookup table built in ledmatrix.cpp. That table expects the chain to start at the top left pixel of the top left panel. Inside a panel the rows snake, the first running left to right and the next one back. Panels are chained the same way: the top row of panels goes left to right and the second row comes back from the right.

The code picks a row's direction from its position on the whole wall, which only matches each panel's own rows because the panels have an even number of them, as 8 × 8 panels do. Neither Minotor nor LEDuino has a setting for another starting corner. A wall wired differently means editing the table in Minotor and the same arithmetic in the sketch's test pattern. It also settles the question the WLED and LedFx guide leaves open: a wall built for Minotor starts at the top left, and so does every panel in it.

Settings on the Minotor side

Matrix dimensions are on the General tab of the configuration dialog, as panels in X and Y, pixels per panel in X and Y, and the renderer size. The defaults already describe the team's wall: three by two panels of 8 × 8, rendered at 24 × 16. A note in the source says the LED matrix size must equal the rendering size, and the dialog warns that Minotor needs a restart after the size changes.

The Serial tab holds the port list and a Connect button. Its Protocol box has a single entry, Leduino. Below them sit Matrix type and pixel count fields that no code reads, so whatever you put there is ignored. On Linux a Mega 2560 shows up as a /dev/ttyACM device, the prefix a disabled filter in the dialog's code was written to look for.

Saved settings go to an INI file called Minotor.ini in the user's settings folder, under renderer/size, renderer/matrixSize, renderer/panelSize and serial/interface. At startup Minotor reopens the saved port, so once a board has been connected it reconnects without a click as long as the device name stays the same.

Flashing LEDuino with today's FastLED

  1. Install the Arduino IDE and add FastLED through the Library Manager. The current release is 3.10.7, from 10 October 2026.
  2. Open leduino.ino and change #include "FastSPI_LED2.h" to #include <FastLED.h>. FastSPI_LED2 was the library's name while the team used it. FastLED 3.10.7 has no header by that name and only keeps FastSPI_LED2 as an alias defined inside FastLED.h, so the sketch as committed fails at that line.
  3. Check the size constants near the top: MATRIX_PANEL_X and MATRIX_PANEL_Y count panels, MATRIX_PANEL_LEDS_X and MATRIX_PANEL_LEDS_Y count pixels in one panel. They ship as 3, 2, 8 and 8. They have to agree with Minotor's General tab, since the sketch waits for exactly that many bytes per frame.
  4. In setup(), keep the active WS2801 line with BRG colour order, or uncomment the one for your chip. The commented list also covers TM1803, TM1804, TM1809, WS2811, WS2812, WS2812B, UCS1903, SM16716 and LPD8806; how the single-wire chips differ from the WS2801 is set out in WS2801 vs WS2812B. Without pin numbers the WS2801 line uses the Mega's hardware SPI on pins 51 and 52, the pins the build guide wires.
  5. Pick Arduino Mega or Mega 2560 as the board and upload.

LEDuino sets the ATmega2560's serial registers by hand and installs its own receive interrupt under the name USART0_RX_vect. The Uno's ATmega328P calls that interrupt USART_RX_vect, so the sketch is tied to the Mega as written. We tried to compile it before publishing. Arduino's AVR compiler for macOS is an Intel binary and our Apple silicon test machine has no Rosetta, so the steps above come from reading the sketch against FastLED 3.10.7 and not from a build log.

What the wall shows at power-on

After a reset LEDuino waits two seconds before touching the LEDs; the comment calls it a safety delay that leaves room to reprogram the board if the pixels drag the power down. It then lights a test pattern without waiting for Minotor. On the 24-pixel-wide wall that is four vertical bars: white in columns 1 to 3, red in 8 to 10, green in 15 to 17 and blue in 22 to 24, each one dark at the top and brightest at the bottom. A bar in the wrong colour points to the colour order in setup(). Bars that come out broken up or scattered mean the wiring does not follow the order described above.

Gamma correction, and two oddities in the receive code

Each frame runs through the tables in gamma.h on its way to the pixels. The tables have 64 steps per colour, so the two lowest bits of every value Minotor sends are dropped. They also top out at different levels. Full red leaves the Arduino as 207, full green as 175 and full blue as 255. According to the comment above them, the team built the curves with a cheap luxmeter held in front of their 384-pixel WS2801 matrix to bring the three colours to similar brightness, so other pixels may need tables of their own.

The interrupt handler contains a command that would toggle gamma correction when the letter g follows an escape sequence, but the counter that arms it is incremented on a line after a return and never moves, so correction stays on permanently. The handler also flags a frame as ready once 1,151 of its 1,152 bytes are in, then ignores everything that arrives while the LEDs are being updated. That can swallow the last byte, the green value of the final pixel in the chain, together with the end marker behind it. How often this happens in practice depends on timing we have not measured.

Driving LEDuino from other software

Since the format is this simple, any program that can open a serial port at 1 Mbit/s can feed a LEDuino board: 1,152 bytes per frame in wiring order, blue then red then green for each pixel, no byte with the value 1, and 0x01 at the end. The tools on the alternatives page use their own serial formats, tpm2, the Glediator protocol and Adalight among them, so switching to one of them means flashing their firmware onto the same Mega. Replacing the board with an ESP32 is covered in the WLED guide.

Sources

Read on 14 October 2026:

Commit and release dates are from the GitHub API on the same day. If you still run a LEDuino board and something here does not match what you see, write to hello@minotor.org.