Main board or device for this build.
Build: M5Stack StickC Plus2
About 30-45 minutes · needs a Mac or PC and a USB-C data cable · some Terminal, or let your agent do it
Intermediate · extra stepsBack up the 8 MB flash first, and flash at 230400 baud for its CH9102 bridge.A working Muse Gadgets: ESP32 Device SDK (Full UI) build on M5Stack StickC Plus2, paired to your Muse account and ready for first prompts.
See inside
Take the M5Stack StickC Plus2 apart
Drag to turn it, pull the slider to explode it, and tap a part to learn what it does. Open the full 3D view
Get the parts
You need the board and any build-specific accessories before flashing or pairing.
Must carry data, not just charge. Most flashing problems are charge-only cables. This Adafruit cable is USB-C on both ends with all data pins connected ($9.95 on 2026-10-05). If your computer has USB-A ports, the Seeed USB-C to USB-A cable works too.
Optional. Runs the gadget from a wall outlet instead of your computer. A phone charger that supplies 5 V / 2 A or more works.
Print it yourself, or upload the STL to a print service such as Craftcloud or JLC3DP; small parts usually cost a few dollars plus shipping.
Get your Muse SDK token
Muse gadgets pair with your account by using a private SDK token.
Create a token at gadgets.muse.ai > Account > SDK tokens (https://gadgets.muse.ai/settings/sdk-tokens). It starts with mgst_. For this ESP32 build, set CONFIG_GADGET_SDK_TOKEN="mgst_YOUR_TOKEN" in build-muse-m5stack-stickc-plus2/sdkconfig after the board build command has created that file, then run the build command again. idf.py -B build-muse-m5stack-stickc-plus2 -DIDF_TARGET=esp32 -DSDKCONFIG=build-muse-m5stack-stickc-plus2/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;devices/sdkconfig.muse;devices/sdkconfig.muse-m5stack-stickc-plus2" menuconfig > ESP32 Device SDK > Muse Gadgets SDK token is the interactive alternative. Never commit the real token or paste it anywhere public.
Flash the firmware
The board needs the Muse ESP32 firmware configured with your SDK token.
Read this first: flashing this board
- Port: Its CH9102 USB bridge shows up as /dev/cu.usbserial-* on macOS or /dev/ttyACM* on Linux.
- tools/muse/board.sh flash plus2 flashes at 230400 baud. Keep any esptool command you run by hand at -b 230400.
- Before the first flash, back up the full 8 MB flash (M5Stack's factory firmware):
python -m esptool --chip esp32 -p PORT -b 230400 read-flash 0 0x800000 plus2.bin. Keepplus2.binsafe, outside Git. - To go back, write the backup with the same chip, port and baud:
python -m esptool --chip esp32 -p PORT -b 230400 write-flash 0 plus2.bin.
Source: https://github.com/facebookincubator/muse-gadget-sdk/blob/main/esp32/devices/README.md
Let your agent do it
Give your coding agent the build brief at https://www.hackshop.dev/build/m5stack-stickc-plus2/build.md. Tell it to keep the token private, use mgst_YOUR_TOKEN as the placeholder, and find the serial port before flashing. It should find the port with ls /dev/cu.usbserial-* 2>/dev/null || ls /dev/ttyACM* /dev/ttyUSB* 2>/dev/null; on Windows, use Device Manager to find the COM port, then run commands in the ESP-IDF shell. Before the first flash, it must back up the full 8 MB flash (M5Stack's factory firmware).
Do it yourself
Install ESP-IDF v6.0.1 and only the esp32 target for this board. Muse's ESP32 README verifies macOS and Linux. Windows is not documented by the Muse SDK; if you use it, install ESP-IDF v6.0.1 with Espressif's Windows installer and run commands in the ESP-IDF shell. Clone the Muse Gadget SDK, run tools/muse/board.sh build plus2 once to create build-muse-m5stack-stickc-plus2/sdkconfig, set CONFIG_GADGET_SDK_TOKEN="mgst_YOUR_TOKEN" in that file, run tools/muse/board.sh build plus2 again, then flash. If flashing cannot connect, hold BOOT, tap RESET, then release BOOT.
git clone -b v6.0.1 --recursive https://github.com/espressif/esp-idf.git ~/esp/esp-idf-v6
~/esp/esp-idf-v6/install.sh esp32
. ~/esp/esp-idf-v6/export.sh
git clone https://github.com/facebookincubator/muse-gadget-sdk
cd muse-gadget-sdk/esp32
tools/muse/board.sh build plus2
printf '\nCONFIG_GADGET_SDK_TOKEN="mgst_YOUR_TOKEN"\n' >> build-muse-m5stack-stickc-plus2/sdkconfig
tools/muse/board.sh build plus2
ls /dev/cu.usbserial-* 2>/dev/null || ls /dev/ttyACM* /dev/ttyUSB* 2>/dev/null
python -m esptool --chip esp32 -p PORT -b 230400 read-flash 0 0x800000 plus2.bin
tools/muse/board.sh flash plus2 PORTPair it with the Muse app
Pairing links the freshly flashed board to your Muse account.
In the Muse app, turn on Settings > Devices > Developer mode, then Settings > Devices > Add Device (+). Pick MuseGadget-XXXXXX and press the front button when the screen or edge status breathes blue. Green means connected. Status meanings: orange = ready for setup, blue breathing = press the button, blue = joining Wi-Fi and connecting, green = connected, yellow blinking = reconnecting, purple = unpaired, red blinking = error. To reset pairing, open Settings > MUSE > Reset pairing on the device and tap again to confirm.
Print the stand
The printable files keep the gadget visible, stable, and easy to reach.
Print the stand from the STL, or send the STEP/STL to a print service. Test fit before leaving the device unattended.
Read fab.json before ordering; print-service materials and tolerances vary.
Put it together
A physical agent body needs to sit safely, keep the cable clear and leave controls reachable.
Put the board in the printed desk stand. Route the cable through the slot or open edge, power it, and check that the buttons and display are reachable.
Try it
A first prompt proves the device is paired, reachable, and useful for the project.
Hand it to your agent
# Build: M5Stack StickC Plus2 as a Muse gadget
Difficulty: Intermediate (extra steps). Back up the 8 MB flash first, and flash at 230400 baud for its CH9102 bridge.
## Goal
A working Muse Gadgets: ESP32 Device SDK (Full UI) build on M5Stack StickC Plus2, paired to your Muse account and ready for first prompts.
## Warnings (read before flashing)
- M5Stack StickC Plus2: back up the 8 MB flash before the first flash. Its CH9102 USB bridge drops out above 230400 baud.
## Hardware
- [M5Stack StickC Plus2](https://shop.m5stack.com/products/m5stickc-plus2-esp32-mini-iot-development-kit) x1 (required, board): Main board or device for this build.
- [USB-C data cable](https://www.adafruit.com/product/4199) x1 (required, part): Must carry data, not just charge. Most flashing problems are charge-only cables. This Adafruit cable is USB-C on both ends with all data pins connected ($9.95 on 2026-10-05). If your computer has USB-A ports, the Seeed USB-C to USB-A cable works too.Caveats + terms
Personal, non-commercial use with your own Muse account. A token can be linked to at most 50 devices. You may not put it in any device you sell, advertise, or list publicly or in a marketplace or app store; other distribution needs Meta's written permission. Provided as-is; Meta can change, withdraw or revoke access at any time. Read terms.
- The home-network tunnel lets Muse reach devices on your LAN that expose a local HTTP API. Treat it like giving the agent a foothold on your network.
- Pairing has no manufacturer verification and can't prevent an active man-in-the-middle attack.
- Builds are signed with the included development key and never enable Secure Boot. Enable NVS encryption (CONFIG_HOMEHUB_NVS_ENCRYPTION).
- Custom ESP32 commands are not a documented API yet: the command set (display.draw_url, sensors.read, camera.capture, ...) is hardcoded in main/app.c.
- End of life at the vendor