# Build: Seeed reTerminal E1002 (7.3" color e-paper) as a Muse gadget

## Goal
A working Muse Gadgets: ESP32 Device SDK (Status) build on Seeed reTerminal E1002 (7.3" color e-paper), paired to your Muse account and ready for first prompts.

## Hardware
- [Seeed reTerminal E1002 (7.3" color e-paper)](https://www.seeedstudio.com/reTerminal-E1002-p-6533.html) x1 (required, board): Main board or device for this build.
- [USB-C data cable](https://www.amazon.com/s?k=USB-C%20data%20cable) x1 (required, part): Must carry data, not just charge. Most flashing problems are charge-only cables.

## Shopping list (ask before buying)
- Seeed reTerminal E1002 (7.3" color e-paper) x1 (required, est. $99; buy: https://www.seeedstudio.com/reTerminal-E1002-p-6533.html)
- USB-C data cable x1 (required, est. $8; search: https://www.amazon.com/s?k=USB-C%20data%20cable)
- Estimated total: $107
- Purchase policy: Show the human one list with links and the total, and get explicit approval for the exact items, sellers and total before buying anything. Amazon and eBay don't allow automated carts or checkout, so for those items give the human the links and let them check out. On other stores, once they approve and ask you to, you may add exactly those items to a cart and check out with a payment method they have already set up. Never buy anything they have not approved, and never type card numbers or passwords yourself.

## Constraints
- Ask the human before any purchase.
- 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-reterminal-e1002/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.
   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, release BOOT, retry.
   - `git clone -b v6.0.1 --recursive https://github.com/espressif/esp-idf.git ~/esp/esp-idf-v6`
   - `~/esp/esp-idf-v6/install.sh esp32s3`
   - `. ~/esp/esp-idf-v6/export.sh`
   - `git clone https://github.com/facebookincubator/muse-gadget-sdk`
   - `cd muse-gadget-sdk/esp32`
   - `tools/board.sh reterminal-e1002 build`
   - `printf '\nCONFIG_GADGET_SDK_TOKEN="mgst_YOUR_TOKEN"\n' >> build-reterminal-e1002/sdkconfig`
   - `tools/board.sh reterminal-e1002 build`
   - `ls /dev/cu.usbmodem* /dev/cu.usbserial* 2>/dev/null || ls /dev/ttyACM* /dev/ttyUSB* 2>/dev/null`
   - `tools/board.sh reterminal-e1002 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 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. 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 USB-C 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.
   - Show a color status card for my day.
   - Display the family calendar.

## Assemble
1. Connect USB-C power/data. Check: Board powers on or appears on the serial port. Robot feasible: yes (USB-C insertion is feasible with a known connector pose.)
2. Build and flash the Muse firmware with the selected board command. Check: Flash completes and serial monitor shows startup logs. 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 board button when the light breathes blue. Check: Status turns green and the app shows connected. Robot feasible: no (Pairing requires the human's Muse app and account.)
4. Try the first board-specific prompt. Check: The gadget responds in Muse or displays the expected status. Robot feasible: no (Requires semantic verification.)

## Verify
- Status indicator is green and the Muse app shows the gadget as connected.
- Try: Show a color status card for my day.
- Try: Display the family calendar.

## 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 docs or firmware: https://www.seeedstudio.com/reTerminal-E1002-p-6533.html
- Board docs or firmware: https://github.com/Seeed-Projects/OSHW-reTerminal-Series-E-D
- Build page: https://www.hackshop.dev/build/seeed-reterminal-e1002
- Save it: tell the human to click Start a build on the build page so their progress is saved.