DEV Community

咻咻咻
咻咻咻

Posted on

How we keep story beats and device actuators in sync over BLE

Connected narrative hardware is easy to demo on the happy path. The interesting cases are mid-scene disconnect and what you put on the wire.

Event bus, not amplitude

We treat the story engine as a publisher of discrete events (beat reached, route chosen, voice line completed). Firmware maps each event to an actuation profile with start/shape/end. That avoids chasing a 20ms audio analysis loop across BLE jitter.

Mid-scene dropout defaults

  1. Link lost → actuator idle (never hold last intensity)
  2. Story clock holds at a beat boundary
  3. Reconnect does not auto-resume physical output; the scene asks again
  4. Telemetry stays counters, not a session transcript

Why this belongs on DEV

This is a protocol/product-safety writeup for makers wiring interactive fiction to peripherals. Product context: Crevia Tech / CRAVE AI (18+ hardware; this post is about the failure path).

Top comments (0)