# Build: Espressif ESP32-C6-DevKitC-1 (no PSRAM) as a Muse gadget
Difficulty: Beginner (no tools). A USB-C data cable and one flash command. No backup or workaround.

## Goal
A working Muse Gadgets: ESP32 Device SDK (Status) build on Espressif ESP32-C6-DevKitC-1 (no PSRAM), paired to your Muse account and ready for first prompts.

## Hardware
- [Espressif ESP32-C6-DevKitC-1 (no PSRAM)](https://www.adafruit.com/product/5672) 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.
- [USB-C power adapter (5 V / 2 A or more)](https://www.amazon.com/s?k=USB-C%20power%20adapter%205V%202A) x1 (optional, part): Optional. Runs the gadget from a wall outlet instead of your computer. A phone charger that supplies 5 V / 2 A or more works.

## Shopping list (ask before buying)
- Espressif ESP32-C6-DevKitC-1 (no PSRAM) x1 (required, est. $10; buy: https://www.adafruit.com/product/5672)
- USB-C data cable x1 (required, est. $10; buy: https://www.adafruit.com/product/4199)
- USB-C power adapter (5 V / 2 A or more) x1 (optional, est. $10; search: https://www.amazon.com/s?k=USB-C%20power%20adapter%205V%202A)
- Estimated total: $20 (estimates checked 2026-10-05)
- Purchase policy: hackshop never buys anything. Your agent can help you buy the parts: it shows you the exact items, sellers and total, then asks "Place this order for $<total> at <seller>?" and waits for a clear yes before it checks out. If it can't check out on a site, or the site doesn't allow automated checkout (Amazon and eBay don't), it gives you the link to buy yourself.

## Constraints
- Never buy anything without a clear yes to "Place this order for $<total> at <seller>?"
- Use `mgst_YOUR_TOKEN` as the placeholder; never commit a real token.
- ESP-IDF v6.0.1 only for ESP32 builds; do not substitute another ESP-IDF version.
- Find the serial port before flashing; only ask the human if the port check is empty or ambiguous.
- 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. (https://gadgets.muse.ai/sdk-terms)

## Steps
1. Get the parts
You need the board and any build-specific accessories before flashing or pairing.
2. 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-c6-nopsram/sdkconfig` after the board build command has created that file, then run the build command again. `idf.py menuconfig` > ESP32 Device SDK > Muse Gadgets SDK token is the interactive alternative. Never commit the real token or paste it anywhere public.
3. Flash the firmware
The board needs the Muse ESP32 firmware configured with your SDK token.
   Port: Native USB on the C6: /dev/cu.usbmodem* on macOS or /dev/ttyACM* on Linux. On Linux, add yourself to the dialout (or uucp) group.
   Run the board build once to create the build sdkconfig, set `CONFIG_GADGET_SDK_TOKEN="mgst_YOUR_TOKEN"`, then run the board build again. `idf.py menuconfig` is the interactive alternative.
   Find the serial port: macOS `ls /dev/cu.usbmodem* /dev/cu.usbserial*`; Linux `ls /dev/ttyACM* /dev/ttyUSB*`; Windows Device Manager shows the COM port for the ESP-IDF shell.
   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 esp32c6`
   - `. ~/esp/esp-idf-v6/export.sh`
   - `git clone https://github.com/facebookincubator/muse-gadget-sdk`
   - `cd muse-gadget-sdk/esp32`
   - `tools/board.sh c6-nopsram build`
   - `printf '\nCONFIG_GADGET_SDK_TOKEN="mgst_YOUR_TOKEN"\n' >> build-c6-nopsram/sdkconfig`
   - `tools/board.sh c6-nopsram build`
   - `ls /dev/cu.usbmodem* /dev/cu.usbserial* 2>/dev/null || ls /dev/ttyACM* /dev/ttyUSB* 2>/dev/null`
   - `tools/board.sh c6-nopsram flash-monitor PORT`
4. Pair 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 BOOT button when the status light 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. Hold the button for 5 seconds to reset pairing.
5. Put it together
A physical agent body needs to sit safely, keep the cable clear and leave controls reachable.
   Put the board in its stand, case or a stable spot on the desk. Route the cable through the slot or open edge, power it, and check that the buttons and display are reachable.
6. Try it
A first prompt proves the device is paired, reachable, and useful for the project.
   - Blink the gadget's light when my build finishes.
   - Is the gadget online right now?

## Assemble
1. Connect the board to the computer with the USB-C data cable. Check: Board powers on and a new serial port appears. Verify: run `ls /dev/cu.usbmodem* /dev/cu.usbserial* 2>/dev/null || ls /dev/ttyACM* /dev/ttyUSB* 2>/dev/null`, expect "A new serial port is listed after the board is plugged in."; visual: The screen or status light turns on. Robot feasible: yes (USB-C insertion is feasible with a known connector pose.)
2. Build and flash the Muse firmware with `tools/board.sh c6-nopsram flash-monitor PORT`. Check: Flash completes and the serial monitor shows startup logs. Verify: run `tools/muse/monitor.py PORT 20`, expect "link.main: Muse Gadget starting"; status light: The status light breathes orange (ready for setup). Robot feasible: no (Requires a computer, serial-port selection and software commands.)
3. In the Muse app, turn on Developer mode, add MuseGadget-XXXXXX and press the BOOT button when the status light breathes blue. Check: Status turns green and the app shows connected. Verify: status light: The status light is green; muse app: MuseGadget-XXXXXX shows as connected under Settings > Devices. Robot feasible: no (Pairing requires the human's Muse app and account.)
4. Run the checks under Verify. Robot feasible: no (Requires the Muse app and a real prompt.)

## Verify
- run `tools/muse/monitor.py PORT 20`, expect "link.main: Muse Gadget starting"
- status light: The status light is green
- muse app: MuseGadget-XXXXXX shows as connected under Settings > Devices
- muse app: Ask Muse something for this gadget such as "Blink the gadget's light when my build finishes". Muse answers in the app and the gadget updates
- Try: Blink the gadget's light when my build finishes.
- Try: Is the gadget online right now?

## References
- SDK repo: https://github.com/facebookincubator/muse-gadget-sdk
- AGENTS.md (read this first): https://github.com/facebookincubator/muse-gadget-sdk/blob/main/esp32/AGENTS.md
- Platform docs: https://github.com/facebookincubator/muse-gadget-sdk/tree/main/esp32
- Board flashing notes: https://github.com/facebookincubator/muse-gadget-sdk/blob/main/esp32/AGENTS.md
- Board docs or firmware: https://docs.espressif.com/projects/esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/user_guide.html
- Build page: https://www.hackshop.dev/build/espressif-esp32-c6-devkitc-1
- Save it: tell the human to click Start a build on the build page so their progress is saved.