The post below is in Portuguese. We will translate critical announcements as the project gains an English-speaking audience.

The Pistonix firmware now runs in your browser

The Pistonix V-twin engine simulator was compiled to WebAssembly and gained an interactive dashboard on the website. You twist the throttle, swap engines, inject a sensor fault, and hear the motor — all running the same closed-loop firmware that validates the bench ECU.

There’s an interactive Pistonix Dash on the site now. Open pistonix.com.br/playground, twist the virtual throttle, and the RPM rises — it isn’t a mock. It’s the V-twin engine simulator we wrote in Rust, compiled to WebAssembly, running the same firmware that validates the physical ECU on the bench. 200+ tests guarantee that what happens there is what will happen on the Proteus.

What you can play with

  • Throttle and watch the maps respond. RPM, MAP, AFR, knock, and DTCs surface the same way they would on the 4” Pistonix Dash.
  • Swap engines. Twin Cam 88, 96, 103 and Milwaukee-Eight 107, 114, 117 — each with its own geometry, torque envelope and knock-detection strategy (ion-sense on TC, piezo per-cylinder on M8).
  • Switch fuels. Gasoline, E10, E85, methanol. The AFR target shifts when you change — because the stoichiometric ratio changes, and the firmware knows that.
  • Force a sensor fault. TPS stuck, ECT open, MAP shorted, IAT open. DTCs appear in the counter, and depending on severity the safety state escalates to Warning, Limp or Cutoff — exactly what will happen on the bike with the ECU plugged in.
  • Hear the engine. Web Audio with pitch tied to RPM × throttle, a lowpass filter that opens under load. It isn’t perfect Harley potato-potato, but it’s enough for the brain to believe the engine is there. (Round 13 added a real V-twin AudioWorklet — proper 315°/405° asymmetric firing — when you click “Audio on”.)

Why this matters for prospective buyers

Pistonix is closed-source firmware, written from scratch, with no open-source fork as upstream. That’s a strategic choice — there’s no GPL to comply with, the product can evolve without licence conversations. The downside is that a prospective customer can’t download the source to evaluate what they’re buying.

The playground solves half of that problem. You don’t see the code, but you see the behaviour — and behaviour is what matters when the thing under test is an ECU. Knock detection that retards on time, AFR closed-loop that converges, cold start that enriches, rev limit that cuts — all there, executable, no install required.

How it works under the hood

The new piece is the wasm feature on the pistonix-engine-sim crate. I added optional wasm-bindgen to the Cargo.toml, exposed a PistonixEngine that wraps EngineSim plus FirmwareLoop (same firmware that runs in tests), and wasm-pack emits a 76 KB raw bundle (~28 KB gzipped).

The /playground page is a stand-alone Astro component — no client framework, no hydration. Vanilla JS imports the WASM bundle, calls engine.tickMs(dt) inside requestAnimationFrame, and maps the telemetry struct to attributes on the SVG. RPM gauge is an arc with animated stroke-dasharray. AFR strip has a marker at 14.7 (gasoline stoich) and the pointer sweeps 10..18. Per-cylinder knock has an orange→red bar. Same layout as dashboard-firmware V2.

CI gained a wasm-build job that cross-compiles for wasm32-unknown-unknown on every PR — break the binding and the build fails before it reaches the site.

ADR-008 said the cloud backend would live on our own K3s. The playground is another point in favour of that decision: all of this is hosted free on Cloudflare static pages, and the 76 KB of wasm ships from the same CDN as the rest of the site.

Limitations you can see

  • No boost / nitrous / launch control in the first cut. Those three Phase 3 firmware features need specific configuration via the FirmwareLoop builder. They landed in a later round of /playground with dedicated toggles (and wheelie protection too — see the wheelie protection post).
  • The earliest sound was generic. Sawtooth + lowpass isn’t a real V-twin. To reproduce the Harley 315°/405° asymmetry you need two phase-locked oscillators with per-firing envelopes. Round 13 shipped exactly that — proper combustion bursts, harmonics, per-cylinder detune.
  • Telemetry doesn’t yet flow to /telemetry/ingest. The endpoint exists with 8 integration tests, but the playground doesn’t ship there yet. There is an opt-in “Share my session” toggle that forwards anonymous demo telemetry to a public counter on the home page — see if it appeals; we picked the privacy trade-off carefully.

What else shipped today

  • Cloud: POST /telemetry/ingest now has 8 integration tests covering auth, Zod validation, the 1000-sample cap, persistence, and download flow. Closed a pending item from the previous STATE.md round.
  • Hero + Footer + OG: /playground became a destination with an inline link in the Hero (with a pulsing spark-orange dot and an arrow that slides on hover), an entry in the Footer, and a dedicated OG card at og/playground.svg. Sharing on WhatsApp / Twitter renders correctly now.

When do I run this on a real bench?

Phase 0 hardware (Proteus F7, Nucleo F767ZI, ESP32-S3, display, LSU 4.9 sensor, tools) is still en route. When it arrives, the pistonix-ecu-firmware crate already compiles for thumbv7em-none-eabihfcargo run --release -p pistonix-ecu-firmware flashes via probe-rs and opens RTT.

The “plug and test when hardware lands” promise still stands. While it doesn’t, the playground is the closest thing — for me and for anyone curious enough to open the site and twist the throttle.

Waitlist

Be the first to know.

Pistonix is under active development. Sign up for product updates, early basemaps, invites to ride at Milwaukee Garage Drag Racing events, and priority on the first batch of Pistonix Forge.

  • Monthly roadmap and firmware updates
  • Invite to pre-sale tuning sessions
  • Priority on the initial Pistonix Forge batch
  • Early access to per-engine basemaps

By signing up you agree to receive emails from Pistonix. We do not share your email. You can unsubscribe at any time.