Magic Panel 32 (wireless)

Estimated reading time: 11 min

The Magic Panel 32 is a versatile display module, featuring a vibrant, full-color 8×8 LED matrix on the front. While its predecessors were based on the popular ESP8266 and standard ESP32 platforms, the system has been completely reimagined for its latest and most powerful iteration.

This new generation is powered by the modern ESP32-C3 Mini and comes with an extensive software update that transforms it from a simple display into a powerful, interactive light engine. This major overhaul introduces a suite of advanced capabilities:

  • Expanded Animation Library: The number of patterns has grown to over 70, including classics like Cylon scanners and complex new simulations like Conway’s Game of Life, the iconic Matrix “Digital Rain”, and even a rotating 3D Cube.
  • Advanced Serial Command Interface: Alongside the legacy JawaLite protocol, a rich, human-readable command set is now available, allowing for deep configuration of every aspect of the panel directly via the Serial Monitor.
  • High-End Visual Features: The system now supports smooth, optional fade transitions between patterns, a curated “Smart Demo” mode, and the ability to run custom pattern playlists.
  • Robust & Modular Software: The original single-file sketch was completely refactored into a clean, modular structure, making it faster, more stable, and easier to extend with new patterns.

The system retains its flexibility and can be operated standalone (power on/off) or offers its rich command structure to be controlled via Serial, I2C, or potentially wireless protocols (Wi-Fi/Bluetooth) thanks to the ESP32’s capabilities. For custom hardware integrations, the ESP on the back can also be left out, as the digital input pin is externally accessible.

Its purpose is to fit perfectly into the upcoming full wireless control system, serving as a dynamic, highly customizable, and intelligent display module.

Available at shop.printed-droid.com

Magic Panel ESP32-C3 Mini (current revision):

Use Firmware Magic_Panel_ESP32_C3_Mini_v2.0.zip from the bottom section!

This sketch is a heavily extended and modularized version of the original Magic Panel sketch from Printed-Droid.com, adapted for the Lolin C3 Mini ESP32. It includes over 70 patterns and animations and features an extended command set for maximum flexibility.

Version 2.2 Updates:

  • Added timing command for custom pattern duration control
  • Fixed external serial controller support via RX/TX pins
  • Enhanced pattern timing control

Connecting to Droid Systems

For builders integrating this panel into droids, here are the recommended connections:

  • Benduino AIO: Connect the “Slave 2” pins to the panel.
  • MarcDuino: Connect the “Slave/MP” pins from the Slave Board to the panel.
  • Recommendation: For full access to all features and stable debugging, a direct Serial USB connection is highly recommended. I2C and JawaLite Serial are supported for compatibility with existing droid control systems.

Operating Modes: Timed vs. AlwaysOn

The firmware supports two main operating modes which control the behavior of patterns after they are executed. This can be controlled via the P command.

  • Timed Mode (P0): This is the default mode. Patterns run for a predefined time or until their animation completes, after which the panel turns off or clears.
  • AlwaysOn Mode (P1): Patterns will loop indefinitely. Short animations will restart upon completion, and continuous effects like Fire or Rainbow will run until a new command is received. The panel stays active until an explicit OFF or S0 command is sent.

Communication Protocols

The panel understands two protocols: the legacy JawaLite protocol for droid systems and an extended, human-readable protocol for the Arduino IDE’s Serial Monitor.

1. JawaLite Protocol

This protocol is optimized for controller-to-device communication. The following commands are supported:

  • A: Turns the panel on (equivalent to ON).
  • D: Turns the panel off (equivalent to OFF).
  • P<0|1>: Sets the operating mode (P0 = Timed, P1 = AlwaysOn).
  • T<n>: Triggers pattern number <n>.
  • C<n>: Selects a preset color (0-8).
  • B<n>: Sets brightness (0-255).
  • V<n>: Sets velocity/speed (1-100).

(NEW) Extended Timed Control

The firmware 2.2 adds a flexible time command. You can now assign a precise runtime in seconds to any pattern using the T (S) command.

  • Syntax: T<ID>:<Duration>
  • Examples:
    • T57 – Rainbow with default duration
    • T57:30 – Rainbow for 30 seconds
    • T21:5 – Cylon for 5 seconds
    • S58:60 – Fire Effect for 1 minute (S works too!)

I2C Control:

  • The panel’s I2C address is 20.
  • Commands must be terminated with a carriage return (\r).
  • Example: To trigger pattern 46 (Heart), send T46\r to address 20.

Serial Control (from MarcDuino):

  • Connect the panel’s RX pin to the “To Slave” signal pin on the MarcDuino.
  • Example: %T2 triggers pattern 2 (Panel on for 2s).

2. Extended Serial Protocol (Serial Monitor)

These commands are designed for easy use via the Arduino IDE’s Serial Monitor. They are not case-sensitive.

  • System & Help Commands
    • HELP or ?: Displays the main help menu.
    • HELP <topic>: Shows detailed help for a category (e.g., HELP DISPLAY).
    • STATUS: Lists the current settings (brightness, color, mode, etc.).
    • LIST: Shows the complete, categorized list of all patterns.
    • DEMO: Runs a curated “smart” demo of the best patterns.
    • SAVE / LOAD: Saves or loads all settings to/from permanent memory.
  • Display & Effect Commands
    • ON / OFF: Turns the panel fully on or off.
    • B <0-255>: Sets brightness.
    • SP <1-100>: Sets animation speed.
    • C <r,g,b>: Sets a custom RGB color (e.g., C 255,100,0).
    • C <0-9>: Sets a preset color (9 enables Rainbow Mode).
    • TRANSITION <0|1>: Disables (0) or enables (1) smooth transitions between patterns.
  • Pattern & Playlist Commands
    • S <n> or T <n>: Runs pattern <n>.
    • START <n>: Sets the default pattern that runs on startup.
    • P <0|1>: Sets the operating mode (Timed/AlwaysOn).
    • PLAYLIST_RUN:<id1,id2,...>: Plays a sequence of patterns (e.g., PLAYLIST_RUN:46,21,57).
  • Text Commands
    • TEXT:<message>: Scrolls a message across the panel.
    • TEXT_BOUNCE:<message>: Displays a message with “bouncing” letters.
    • TEXTSAVE<n>:<message>: Saves a message to a storage slot (0-9).
    • TEXTLOAD<n>: Loads and scrolls a message from a storage slot.
    • FONT <0|1>: Selects the font (0=Standard, 1=Aurebesh).

Complete Pattern List

Here is a detailed list of every implemented pattern.

Basic Patterns (0-7)

  • 0: Off – Turns all LEDs off.
  • 1: On (Indefinite) – Turns all LEDs on.
  • 2: On (2s) – Turns all LEDs on for 2 seconds.
  • 3: On (5s) – Turns all LEDs on for 5 seconds.
  • 4: On (10s) – Turns all LEDs on for 10 seconds.
  • 5: Toggle – Top and bottom halves of the panel alternate.
  • 6: Alert (4s) – Panel flashes rapidly for 4 seconds.
  • 7: Alert (10s) – Panel flashes rapidly for 10 seconds.

Trace & Movement Patterns (8-15, 48-51)

  • 8: Trace Up Fill – Fills rows from bottom to top.
  • 9: Trace Up Line – A single row travels from bottom to top.
  • 10: Trace Down Fill – Fills rows from top to bottom.
  • 11: Trace Down Line – A single row travels from top to bottom.
  • 12: Trace Right Fill – Fills columns from left to right.
  • 13: Trace Right Line – A single column travels from left to right.
  • 14: Trace Left Fill – Fills columns from right to left.
  • 15: Trace Left Line – A single column travels from right to left.
  • 48: Compress In Fill – Fills the panel from the outer edges to the center.
  • 49: Compress In Clear – Fills like #48, then clears from the center outwards.
  • 50: Explode Out Fill – Fills the panel from the center to the outer edges.
  • 51: Explode Out Clear – Fills like #50, then clears from the edges inwards.

Effect Patterns (16-19, 24-28, 57-60, 64-66)

  • 16: Expand Fill – A square expands from the center, filling the panel.
  • 17: Expand Ring – A square ring expands from the center.
  • 18: Compress Fill – The lit panel clears from the edges inwards.
  • 19: Compress Ring – A square ring collapses from the edges to the center.
  • 24: Fade Out/In – All LEDs slowly fade to black and back on.
  • 25: Fade Out – All LEDs slowly fade to black.
  • 26: Flash All – All LEDs flash on and off.
  • 27: Flash Vertical – The left and right halves alternate flashing.
  • 28: Flash Quadrants – Diagonal quadrants alternate flashing.
  • 57: Rainbow Cycle – A smooth rainbow gradient flows across the LEDs 🌈.
  • 58: Fire Effect – A realistic, flickering fire simulation 🔥.
  • 59: Twinkle – Random pixels sparkle and fade like stars ✨.
  • 60: Plasma – A moving, amorphous plasma effect.
  • 64: Kaleidoscope – Symmetrical, colorful patterns.
  • 65: Raindrops – Simulates raindrops creating ripples.
  • 66: Drip Effect – Pixels “drip” from the top of the panel downwards.

Animation Patterns (21-23, 29-30, 52-55, 61-63, 67-68)

  • 21: Cylon (Column) – A vertical bar scans back and forth.
  • 22: Cylon (Row) – A horizontal bar scans up and down.
  • 23: Eye Scan – Rows and then columns are scanned sequentially.
  • 29: Two Loop – Two pixels loop opposite each other around the border.
  • 30: One Loop – A single pixel loops around the border.
  • 52-55: VU Meters – Simulates an audio VU meter from all four directions.
  • 61: Game of Life – Conway’s Game of Life cellular automaton.
  • 62: Matrix Rain – The classic green “digital rain” effect.
  • 63: Rotating 3D Cube – A wireframe 3D cube rotates in space.
  • 67: Pac-Man Animation – A short animation of Pac-Man being chased by a ghost.
  • 68: Space Invaders Animation – A classic Invader moves across the screen.

Shapes & Symbols (20, 31-47, 56)

  • 20: Cross – Displays an ‘X’ symbol.
  • 31-32: Test Fill/Pixel – Fills or tests each pixel sequentially.
  • 33: AI Logo – Displays the “AI” Aurebesh characters.
  • 34: 2GWD Logo – Displays the characters ‘2’, ‘G’, ‘W’, ‘D’.
  • 35-38: Quadrant Sequences – Lights up quadrants in four different orders.
  • 39: Random Pixel – A single random pixel flashes.
  • 40-41: Countdowns – Counts down from 9 or 3.
  • 42-43: Random Alerts – A random, flickering alert flash.
  • 44: Smiley Face 😃.
  • 45: Sad Face 😟.
  • 46: Heart ❤️.
  • 47: Checkerboard – A flashing checkerboard pattern.
  • 56: Animated Heart – A beating heart animation.

Special Functions (80, 97-99)

  • 80: Bouncing Text – Displays a demo message with “bouncing” letters.
  • 97: Text Scroll (English) – A predefined test message scrolls by.
  • 98: Text Scroll (Aurebesh) – A predefined Aurebesh test message scrolls by.
  • 99: Test All – Runs every regular pattern (0-68) sequentially.

FAQ (Frequently Asked Questions)

Q1: Why is nothing showing up on my Serial Monitor?

  • A: This is almost always due to one of two things. First, ensure the baud rate in your Serial Monitor window is set to 115200. Second, for development, add the line while (!Serial); right after Serial.begin(...) in your setup() function. This forces the ESP32 to wait until the monitor is connected before it continues, ensuring you don’t miss the startup messages.

Q2: Why do my patterns look mirrored, upside down, or scrambled?

  • A: This indicates that the physical wiring of your LED matrix does not match the layout defined in the code. This firmware is configured for a Progressive “Scanline” Layout, where the first pixel (index 0) is top-left, and rows are wired from left to right, one after the other, like reading a book. Please check the xyToIndex function in led_control.h and adjust it if your matrix is wired differently (e.g., in a serpentine/snake pattern).

Q3: How can I change the default settings permanently?

  • A: You can change the default brightness, speed, etc., by editing the #define values at the top of the config.h file and re-uploading the sketch. Alternatively, you can set your desired values using serial commands (like B 150, SP 70, START 57) and then send the SAVE command to write these settings to permanent memory.

Q4: How do I add my own custom pattern?

  • A: 1. Write your pattern logic as a new function inside the appropriate patterns_*.h file (e.g., a new effect goes in patterns_effects.h). 2. Add a new PATTERN_... entry with a unique ID number to the PatternID enum in config.h. 3. Add a new case for your ID to the runPattern() function in the main .ino file, making it call your new function.

HELP Command Reference

This is what you will see when you type HELP in the Serial Monitor.

=== Magic Panel Help ===
Type 'HELP <topic>' for more information, or 'DEMO' for a show.

Available topics:
  * GENERAL     (ON, OFF, SAVE, LOAD, STATUS)
  * DISPLAY     (Color, Brightness, Speed, Transitions)
  * PATTERNS    (Run, List, Set Startup Pattern, DEMO)
  * TEXT        (Scroll, Bounce, Save/Load, Font)
  * PLAYLISTS   (Run pattern sequences)
  * ALL         (Show all commands at once)

Type 'LIST' to see a structured list of all patterns.

ESP32 /ESP8266 (older revisions):

Connection:

Benduino AIO: Slave 2 pins

Marcduino: Slave Board – Slave/MP pins

I highly reccomend to connect it via serial and not via i2c

Adapted sketch for the Printed-Droid.com Magic Panel using Fastled

The Full description of all command sequences are listed below. These are called using either i2c or serial and supplying the mode number as listed.

The Code has two modes of operating. It is possible to set this during runtime of the panel, however the default is controlled in the code below. To set the Defaul mode, change the variable “alwaysOn” to be either true or false. The default here is false.

If alwaysOn is set to False, the patterns will display for a given time, and then turn off.

If alwaysOn is set to True, the pattern will display until the T00 (off) command is received. (or loop until T00 is received).

To change the Default, Command P0 will set to “false”, Command P1 will set to “true”, overriding the default for this session.

The Magic Panel uses JawaLite commands to trigger the patterns. Currently only A, D, P, and T commands from the JawaLite spec are supported.

Command A will turn the panel on

Command D will turn the panel off

Command P will set the default panel mode as described above.

Command T will trigger a numbered pattern. Txx where xx is the pattern number below.

When sending i2c command the Panel Address is defined below to be 20. The command type and value are needed. To trigger a pattern, send character ‘T’ and the value corresponding to the pattern list below to trigger the corresponding sequence.

Sequences must be terminated with a carriage return (\r)

On the MarcDuino i2c can be connected from either the Master or Slave

e.g. &20,x54,2\r – This will turn on the MP for ~2 seconds.

When sending commands via serial, no address is required as Serial is a point to point communication protocol.

Sequences must be terminated with a carriage return (\r)

To use the MarcDuino Serial triggering, connect Pin 3 of the Magic Panel (Rx) to the “To Slave” Signal pin on the

MarcDuino Slave.

e.g. %T2 – This will turn on the MP for ~2 seconds.

Mode 0 – Turn Panel off

Mode 1 – Turn Panel on Indefinately

Mode 2 – Turn Panel on for 2s

Mode 3 – Turn Panel on for 5s

Mode 4 – Turn Panel on for 10s

Mode 5 – Begins Toggle Sequence: Top and Bottom Half of Panel Alternate

Mode 6 – Begins Alert Sequence (4s): Panel Rapidly Flashes On & Off

Mode 7 – Begins Alert Sequence (10s): Panel Rapidly Flashes On & Off

Mode 8 – Begins Trace Up Sequence (Type 1): Each Row of the MP lights up from bottom to top filling entire panel

Mode 9 – Begins Trace Up Sequence (Type 2): Each row of the MP lights up from bottom to top individually

Mode 10 – Begins Trace Down Sequence (Type 1): Each row of the MP lights up from top to bottom filling entire panel

Mode 11 – Begins Trace Down Sequence (Type 2): Each row of the MP lights up from top to bottom individually

Mode 12 – Begins Trace Right Sequence (Type 1): Each column of the MP lights up from left to right filling entire panel

Mode 13 – Begins Trace Right Sequence (Type 2): Each column of the MP lights up from left to right individually

Mode 14 – Begins Trace Left Sequence (Type 1): Each column of the MP lights up from right to left filling entire panel

Mode 15 – Begins Trace Left Sequence (Type 2): Each column of the MP lights up from right to left individually

Mode 16 – Begins Expand Sequence (Type 1): Panel expands from center filling entire panel

Mode 17 – Begins Expand Sequence (Type 2): Ring of pixels expands from center of panel

Mode 18 – Begins Compress Sequence (Type 1): Panel compresses from outer edge filling entire panel

Mode 19 – Begins Compress Sequence (Type 2): Ring of pixels compresses from outer edge of panel

Mode 20 – Begins Cross Sequence: Panel is lit to display an X for 3s

Mode 21 – Begins Cyclon Column Sequence: Each column illuminated one at a time from left to right back to left. (like the Cylons from Battlestar Galactica)

Mode 22 – Begins Cyclon Row Sequence: Each row illuminated one at a time from top to bottom back to top. (like the Cylons from Battlestar Galactica)

Mode 23 – Begins Eye Scan Sequence: Each row is illuminated from top to bottom followed by each column left to right. (like the eye ball scanners in the Mission Impossible movies)

Mode 24 – Begins Fade Out/In Sequence: MP gradually and randomly fades out and then fades back in the same manner.

Mode 25 – Begins Fade Out Sequence: MP gradually and randomly fades out (Similar to the Short Circuit Sequence on Teeces).

Mode 26 – Begins Flash Sequence: MP flashes rapidly for 5 seconds (Similar to Alarm Sequence)

Mode 27 – Begins Flash V Sequence: Left and Right Half of Panel Alternate

Mode 28 – Begins Flash Q Sequence: Alternating quadrants of MP flash rapidly

Mode 29 – Begins Two Loop Sequence: Dual pixels are lit opposite each other completing a loop around the 2nd ring from panel edge.

Mode 30 – Begins One Loop Sequence: A single pixel is lit individually completing a loop around the 2nd ring from panel edge.

Mode 31 – Begins Test Sequence (Type 1): Each pixel of the MP is lit sequentially from row 0, column 7 to row 7, column 0 until panel is filled, then unlit in the same order.

Mode 32 – Begins Test Sequence (Type 2): Each pixel of the MP is lit indivually from row 0, column 7 to row 7, column 0.

Mode 33 – Begins AI Logo Sequence: Displays the AI Aurebesh characters for 3s (…that we see all over our awesome packages from Rotopod and McWhlr)

Mode 34 – Begins 2GWD Logo Sequence: Displays the Characters 2-G-W-D sequentially every 1s (…shameless, I know.)

Mode 35 – Begins Quadrant Sequence (Type 1): Each Panel Quadrant lights up individually (TL, TR, BR, BL)

Mode 36 – Begins Quadrant Sequence (Type 2): Each Panel Quadrant lights up individually (TR, TL, BL, BR)

Mode 37 – Begins Quadrant Sequence (Type 3): Each Panel Quadrant lights up individually (TR, BR, BL, TL)

Mode 38 – Begins Quadrant Sequence (Type 4): Each Panel Quadrant lights up individually (TL, BL, BR, TR)

Mode 39 – Begins Random Pixel Sequence: Random pixels flashe individually for 6s

Mode 40 – Begins countdown from 9 to 0 (takes 10 seconds)

Mode 41 – Begins countdown from 3 to 0 (takes 4 seconds)

Mode 42 – Begins Alert Sequence (4s): Panel Randomly Flashes On & Off, mimics the original MarcDuino code

Mode 43 – Begins Alert Sequence (8s): Panel Randomly Flashes On & Off, mimics the original MarcDuino code

Mode 44 – Begins Smiley Face

Mode 45 – Begins Sad Face

Mode 46 – Begins Heart

Mode 47 – Begins Flash Checkerboard sequence. Flashes small squares in a checkerboard pattern

Mode 48 – Begins Compress In Type 1 – Fills the rows from TL/BR in half row increments 5 times

Mode 49 – Begins Compress In Type 2 – Fills the rows from TL/BR in half row increments then clears in the same order 5 times

Mode 50 – Begins Explode Out Type 1 – Fills the rows from Centre Out in half row increments 5 times

Mode 51 – Begins Explode Out Type 2 – Fills the rows from Centre Out in half row increments then clears in the same order 5 times

Mode 52 – Begins VU Meter – Randomly ramp up/down on the columns to simulate a VU Meter. (Type 1)

Mode 53 – Begins VU Meter – Randomly ramp up/down on the rows to simulate a VU Meter. (Type 2)

Mode 54 – Begins VU Meter – Randomly ramp up/down on the columns from the top to simulate a VU Meter. (Type 3)

Mode 55 – Begins VU Meter – Randomly ramp up/down on the rows from the right to simulate a VU Meter. (Type 4)

Tags:
Was this article helpful?
Dislike 0 0 of 0 found this article helpful.
Views: 1010
Previous: Magic Panel