Skip to content

Modules — User Reference

This page explains what modules are and how to use them from the UI. For the technical architecture behind modules, see the developer guide. To write your own module, see add-a-module.md.


What is a Module?

A Module is the unit of work in projectMM. Every running function — a light effect, a pixel blender, a WiFi connection, a system status reporter — is a module. Modules are:

  • Added and removed at runtime — no reflashing needed.
  • Configured through the UI — controls are rendered automatically from each module's schema.
  • Stateful — their configuration (control values) is saved to the device and restored on next boot.
  • Hierarchical — modules can have parent-child relationships. A child module's lifecycle is managed by its parent.

The standard light pipeline

The most common module arrangement for light output:

EffectsLayer (parent)
  └─ SineEffectModule (child, writes pixels into EffectsLayer)

DriverLayer (blends all EffectsLayers)
  └─ PreviewModule (shows the blended output in the browser)
  1. EffectsLayer — allocates the pixel buffer. One EffectsLayer per group of effects.
  2. Effect module (e.g. SineEffectModule) — writes RGB pixels into its EffectsLayer each tick.
  3. DriverLayer — blends all EffectsLayer outputs into a single frame.
  4. PreviewModule — streams the blended frame to the browser's WebGL canvas over WebSocket.

Module categories

Category Examples Purpose
effect SineEffectModule Generates pixel data, writes into a EffectsLayer
modifier BrightnessModifierModule Reads pixel data, modifies it in-place
layout EffectsLayer, DriverLayer Owns pixel buffers, mediates data flow
driver (future) Sends pixel data to real hardware
system SystemStatusModule Reports device health; permanent on all platforms
network NetworkModule, WifiStaModule, WifiApModule, EthernetModule Network connectivity; permanent on ESP32

Module reference pages

Detailed per-module documentation:


Test status

Every module has automated test coverage. Current results:

Each module reference page below includes a Test coverage section linking directly to the relevant test sections.


The enabled control

Every module has an enabled checkbox (added automatically). When unchecked: - The module's loop() is skipped each tick. - The module stays in memory — its configuration and state are preserved. - Children of a disabled parent are also skipped.

This is useful for temporarily disabling an effect without removing it.