Viewer: show the clock on the M5Stack CoreS3 in 3D #9

Merged
audrow merged 3 commits from cores3-in-3d into main 2026-11-15 06:59:50 -06:00
Owner

Preview: 3D viewer with the CoreS3 (private Claude artifact). Pick V1 · CoreS3 under Version.

Was stacked on #8, which has merged; now based on main.

The 3D viewer gets a V1 · CoreS3 version: the M5Stack CoreS3 the clock runs on today, with the firmware running on its screen at the CoreS3's own 320 × 240. Until now the viewer only showed the firmware on the V2/V3 screens (616 × 284 and 600 × 450).

Boards (firmware): what a clock has is now a Board in include/alarm_face.hpp, set per build with -D flags, so the same code deploys to each board.

  • platformio.ini builds the CoreS3 with -DCLOCK_HAS_LAMP=0. On that build there's no Lamp tile (six tiles, one page, no dots), no lamp icon on the clock face (the sound icon takes its place), and the button only snoozes.
  • Lamp, wind-down and wake-up commands answer "no lamp on this clock", and help leaves them out.
  • Nothing is written to the lamp pin.
  • The simulator picks the board with sim_board() before sim_init(). The state JSON ends with board.has_lamp.
  • The viewer boots its CoreS3 that way (SIM_LAMP) and hides the lamp toggle and the Wind down / Wake up jumps for it.
  • platformio.ini no longer pins the USB port, so uploads find the clock wherever it is plugged in.
  • Flashed to the real CoreS3 and checked over USB: it boots without the lamp (help has no lamp commands, state has menu_page), and the time and settings came through.
  • New screens: 320x240-no_lamp-clock.png and 320x240-no_lamp-settings.png. New test: board_without_lamp at 10 sizes. AGENTS.md has a Boards section.

What changes

  • clock.py: a cores3 variant (kind="devkit"). It stands on its edge, 54 × 54 × 16 mm, with a touchscreen, power button, USB-C and camera. The outline is the published size; the screen, camera, button and USB-C positions are approximate. out/cores3/ has the STEP, STL, GLB and report.
  • python clock.py cores3 rebuilds only the variants you name. Rebuilding all of them rewrites every committed STEP file with a new timestamp, so the other variants are untouched here.
  • Viewer: a V1 · CoreS3 button. The simulator reboots at 320 × 240 for it. Interact zooms onto its screen, clicking the screen or body opens Interact, and the side power button is the clock's button (snooze, or the lamp), as M5.BtnPWR is in the firmware. The fit and cost panels are simpler: size, screen, digit height, and the CoreS3 plus a cable. The lamp glow is off for this version, since its lamp is on the V2 breadboard.
  • hardware/cad/README.md: four variants, and the variant filter.

Tested locally (viewer served from hardware/cad/viewer/, driven in the browser):

  • The V1 · CoreS3 version boots the firmware at 320 × 240 and draws on the 3D screen.
  • Interact plus taps reach Settings → Time on the CoreS3.
  • The power button toggles the lamp.
  • Bench, 4.1″ and 2.41″ still load at 616 × 284, 616 × 284 and 600 × 450, with their own cost panels.
  • No console errors.
  • clock.py cores3 reports no clashes.

Also: clock.wasm is rebuilt and the screens are regenerated. The PlatformIO CoreS3 build (with the flag) succeeds. alarmclock.audrow.com hasn't been redeployed, so its STL/STEP download links for cores3 404 until it is.

🤖 Generated with Claude Code

After merge: redeploy alarmclock.audrow.com (python hardware/cad/viewer.py, then npx wrangler deploy from hardware/cad/site/) so the CoreS3 shows there and its STL/STEP links work.

Feedback from the maintainer

  • Also display the clock's output on the M5Stack CoreS3 in 3D. A V1 · CoreS3 version in the viewer runs the firmware on the CoreS3's screen at 320 × 240.
  • The CoreS3 has no lamp: hide its lamp options. No Lamp tile (six tiles, one page), no lamp icon, the button only snoozes, lamp commands answer "no lamp on this clock", and the lamp pin is never driven. The viewer's CoreS3 boots that way and hides its lamp controls.
  • Make which hardware a board has configurable, so the same code deploys to each board with minimal changes. Board in alarm_face.hpp, set by -DCLOCK_HAS_LAMP=0 in platformio.ini for the CoreS3; the simulator sets it with sim_board(). Documented in AGENTS.md.
  • Let uploads find the clock on any USB port. upload_port and monitor_port are gone from platformio.ini; a plain pio run -t upload found the CoreS3 on usbmodem2101 and flashed it.
**Preview:** [3D viewer with the CoreS3](https://claude.ai/artifact/2eGotEFT1WeLLLze6vpQ8t) (private Claude artifact). Pick **V1 · CoreS3** under Version. Was stacked on #8, which has merged; now based on `main`. The 3D viewer gets a **V1 · CoreS3** version: the M5Stack CoreS3 the clock runs on today, with the firmware running on its screen at the CoreS3's own **320 × 240**. Until now the viewer only showed the firmware on the V2/V3 screens (616 × 284 and 600 × 450). **Boards (firmware):** what a clock has is now a `Board` in `include/alarm_face.hpp`, set per build with `-D` flags, so the same code deploys to each board. - `platformio.ini` builds the CoreS3 with `-DCLOCK_HAS_LAMP=0`. On that build there's no Lamp tile (six tiles, one page, no dots), no lamp icon on the clock face (the sound icon takes its place), and the button only snoozes. - Lamp, wind-down and wake-up commands answer "no lamp on this clock", and `help` leaves them out. - Nothing is written to the lamp pin. - The simulator picks the board with `sim_board()` before `sim_init()`. The state JSON ends with `board.has_lamp`. - The viewer boots its CoreS3 that way (`SIM_LAMP`) and hides the lamp toggle and the Wind down / Wake up jumps for it. - `platformio.ini` no longer pins the USB port, so uploads find the clock wherever it is plugged in. - Flashed to the real CoreS3 and checked over USB: it boots without the lamp (`help` has no lamp commands, state has `menu_page`), and the time and settings came through. - New screens: `320x240-no_lamp-clock.png` and `320x240-no_lamp-settings.png`. New test: `board_without_lamp` at 10 sizes. `AGENTS.md` has a Boards section. **What changes** - `clock.py`: a `cores3` variant (`kind="devkit"`). It stands on its edge, 54 × 54 × 16 mm, with a touchscreen, power button, USB-C and camera. The outline is the published size; the screen, camera, button and USB-C positions are approximate. `out/cores3/` has the STEP, STL, GLB and report. - `python clock.py cores3` rebuilds only the variants you name. Rebuilding all of them rewrites every committed STEP file with a new timestamp, so the other variants are untouched here. - Viewer: a V1 · CoreS3 button. The simulator reboots at 320 × 240 for it. Interact zooms onto its screen, clicking the screen or body opens Interact, and the side power button is the clock's button (snooze, or the lamp), as `M5.BtnPWR` is in the firmware. The fit and cost panels are simpler: size, screen, digit height, and the CoreS3 plus a cable. The lamp glow is off for this version, since its lamp is on the V2 breadboard. - `hardware/cad/README.md`: four variants, and the variant filter. **Tested locally** (viewer served from `hardware/cad/viewer/`, driven in the browser): - The V1 · CoreS3 version boots the firmware at 320 × 240 and draws on the 3D screen. - Interact plus taps reach Settings → Time on the CoreS3. - The power button toggles the lamp. - Bench, 4.1″ and 2.41″ still load at 616 × 284, 616 × 284 and 600 × 450, with their own cost panels. - No console errors. - `clock.py cores3` reports no clashes. **Also:** `clock.wasm` is rebuilt and the screens are regenerated. The PlatformIO CoreS3 build (with the flag) succeeds. alarmclock.audrow.com hasn't been redeployed, so its STL/STEP download links for `cores3` 404 until it is. 🤖 Generated with [Claude Code](https://claude.com/claude-code) **After merge:** redeploy alarmclock.audrow.com (`python hardware/cad/viewer.py`, then `npx wrangler deploy` from `hardware/cad/site/`) so the CoreS3 shows there and its STL/STEP links work. ## Feedback from the maintainer - [x] Also display the clock's output on the M5Stack CoreS3 in 3D. A V1 · CoreS3 version in the viewer runs the firmware on the CoreS3's screen at 320 × 240. - [x] The CoreS3 has no lamp: hide its lamp options. No Lamp tile (six tiles, one page), no lamp icon, the button only snoozes, lamp commands answer "no lamp on this clock", and the lamp pin is never driven. The viewer's CoreS3 boots that way and hides its lamp controls. - [x] Make which hardware a board has configurable, so the same code deploys to each board with minimal changes. `Board` in `alarm_face.hpp`, set by `-DCLOCK_HAS_LAMP=0` in `platformio.ini` for the CoreS3; the simulator sets it with `sim_board()`. Documented in `AGENTS.md`. - [x] Let uploads find the clock on any USB port. `upload_port` and `monitor_port` are gone from `platformio.ini`; a plain `pio run -t upload` found the CoreS3 on `usbmodem2101` and flashed it.
Viewer: show the clock on the M5Stack CoreS3 in 3D
All checks were successful
host / test (push) Successful in 10s
host / test (pull_request) Successful in 11s
host / simulator (pull_request) Successful in 52s
host / simulator (push) Successful in 1m13s
host / firmware (push) Successful in 5m57s
host / firmware (pull_request) Successful in 6m6s
fce65cec45
A V1 · CoreS3 version in the 3D viewer: the CoreS3 (54 x 54 x 16 mm)
standing on its edge, with the firmware running on its screen at the
CoreS3's own 320 x 240. Interact zooms onto it, and its power button is
the clock's button, as M5.BtnPWR is in the firmware. The outline is the
published size; the screen, camera, button and USB-C positions are
approximate. clock.py takes variant keys to rebuild only those, so the
other variants' STEP files aren't rewritten with new timestamps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audrow force-pushed cores3-in-3d from fce65cec45
All checks were successful
host / test (push) Successful in 10s
host / test (pull_request) Successful in 11s
host / simulator (pull_request) Successful in 52s
host / simulator (push) Successful in 1m13s
host / firmware (push) Successful in 5m57s
host / firmware (pull_request) Successful in 6m6s
to 7e7fc17e2d
All checks were successful
host / test (push) Successful in 10s
host / test (pull_request) Successful in 10s
host / simulator (push) Successful in 45s
host / simulator (pull_request) Successful in 40s
host / firmware (push) Successful in 3m55s
host / firmware (pull_request) Successful in 3m49s
2026-11-15 05:25:17 -06:00
Compare
audrow force-pushed cores3-in-3d from 7e7fc17e2d
All checks were successful
host / test (push) Successful in 10s
host / test (pull_request) Successful in 10s
host / simulator (push) Successful in 45s
host / simulator (pull_request) Successful in 40s
host / firmware (push) Successful in 3m55s
host / firmware (pull_request) Successful in 3m49s
to 1ae7faa9f7
All checks were successful
host / test (push) Successful in 12s
host / simulator (push) Successful in 56s
host / test (pull_request) Successful in 12s
host / simulator (pull_request) Successful in 1m0s
host / firmware (push) Successful in 6m40s
host / firmware (pull_request) Successful in 6m47s
2026-11-15 05:44:41 -06:00
Compare
platformio: find the clock on any USB port
All checks were successful
host / test (pull_request) Successful in 10s
host / test (push) Successful in 14s
host / simulator (push) Successful in 36s
host / simulator (pull_request) Successful in 49s
host / firmware (push) Successful in 6m7s
host / firmware (pull_request) Successful in 6m8s
f046e1466c
The fixed /dev/cu.usbmodem1101 broke uploads whenever the clock was on
another port (it was on 2101). Without upload_port and monitor_port,
PlatformIO detects it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
audrow force-pushed cores3-in-3d from f046e1466c
All checks were successful
host / test (pull_request) Successful in 10s
host / test (push) Successful in 14s
host / simulator (push) Successful in 36s
host / simulator (pull_request) Successful in 49s
host / firmware (push) Successful in 6m7s
host / firmware (pull_request) Successful in 6m8s
to 55266e3713
All checks were successful
host / test (push) Successful in 14s
host / test (pull_request) Successful in 13s
host / simulator (push) Successful in 1m23s
host / simulator (pull_request) Successful in 1m15s
host / firmware (push) Successful in 6m14s
host / firmware (pull_request) Successful in 5m55s
2026-11-15 06:52:48 -06:00
Compare
audrow changed target branch from set-time-in-settings to main 2026-11-15 06:52:48 -06:00
audrow merged commit c351a8bc85 into main 2026-11-15 06:59:50 -06:00
Sign in to join this conversation.
No description provided.