Skip to content

M5 Atom Matrix

Works, with caveatsOriginal ESP32. Fine if you own one, but keep the LED brightness cap.
ChipESP32
Form factorCube, 24 × 24 × 14 mm, 5 × 5 RGB LED matrix on top
Flash4 MB
Antenna3D antenna
USBUSB-C (USB-UART)
InstallBrowser installer, m5atom or esp32 flavor (the same build on v5)
Storesm5stack
GPIOFunctionESPresense setting
2725 × WS2812C RGB LEDs (5 × 5 matrix)LEDs
39Button under the matrix (active low)Inputs
26GROVE SDA (yellow)I2C bus 1 SDA
32GROVE SCL (white)I2C bus 1 SCL
25Internal I2C SDA (MPU6886 IMU)—
21Internal I2C SCL—
12IR emitter—

Paste this into the Board Template box on the node's Templates page, then Preview and Apply (firmware v5.0.0b1 or later). It sets the board's pins (and Ethernet type, if it has one) in one go. Apply it before any add-on template. The LED, input and output lists replace what was configured before, so the result doesn't depend on the node's old setup. See Templates.

{"name":"M5 Atom Matrix","chip":"esp32","settings":{"I2C_Bus_1_SDA":26,"I2C_Bus_1_SCL":32,"leds":[{"type":"grb","pin":27,"count":25,"control":"status","max_brightness":40}],"inputs":[{"name":"Button","role":"button","pin":39,"type":"floating_inverted"}],"outputs":[]}}
Formatted, with what each value means
{
  "name": "M5 Atom Matrix",
  "chip": "esp32",
  "settings": {
    "I2C_Bus_1_SDA": 26,
    "I2C_Bus_1_SCL": 32,
    "leds": [
      {
        "type": "grb",
        "pin": 27,
        "count": 25,
        "control": "status",
        "max_brightness": 40
      }
    ],
    "inputs": [
      {
        "name": "Button",
        "role": "button",
        "pin": 39,
        "type": "floating_inverted"
      }
    ],
    "outputs": []
  }
}

LED type: pwm, pwm_inverted, grb, grbw, rgb or rgbw (the last four are addressable). LED control: mqtt, status, motion, count, or output (follows the output numbered byoutput). Input type: pullup, pulldown or floating, with_inverted for active-low. Output type: output, output_inverted, or high/low for a pin that's just held at that level. An output's input is the 1-based input that controls it. power takes ESPHome's hlw8012 values (a cse7766 needs only rx); sel_inverted matches ESPHome's inverted on sel_pin. eth is the Ethernet Type's option number.

  • Keep the brightness cap. 25 LEDs packed under a small diffuser get hot at full brightness. max_brightness: 40 (of 255) is the ceiling M5Stack’s own Atom library uses: it maps its 0–100 brightness scale to 0–40 and starts at 20. M5Stack’s docs recommend a FastLED brightness of 20 and warn that full-on operation can damage the LEDs and panel. The v4 m5atom flavor used 50. The full brightness range from MQTT and Home Assistant is scaled down into the cap. Without it, the LEDs use the firmware’s default: 100 for addressable LEDs up to v5.0.0b3, 64 from ESPresense#2551. Change the cap on the Hardware page.
  • Without the template the matrix stays dark. The esp32 build’s default status LED is a PWM LED on GPIO 2, which this board doesn’t have. The m5atom installer flavor is the same build under another name.
  • The button has an external pull-up and GPIO 39 is input-only, so it uses floating_inverted.
  • The template makes the GROVE port I2C bus 1, ready for a sensor such as the ENV IV: apply its add-on template next. The internal bus to the IMU (GPIO 25/21) isn’t set up, because ESPresense doesn’t use the IMU.
  • The IR emitter isn’t used by ESPresense.
  • ESPresense firmware v4: the M5ATOM block in include/defaults.h (LED on GPIO 27, 25 LEDs, button on GPIO 39, MAX_BRIGHTNESS 50, GROVE I2C on 26/32)
  • M5Stack Atom Matrix docs