MTSimulation labs
Bounded teaching models · hardware untested

Make a prediction.
Interrogate the model.

These labs expose their equations and omissions. They help you reason before a bench test; they do not select parts, certify a circuit, or replace measurements and datasheets.

Current lab

GPIO state model

Read the supporting lesson →
01

Declarative JSON only

Describe states and input levels

Supported syntax: { initialState, states: { NAME: { led, transitions: [{ to, afterMs } | { to, button }] } } }. Each transition has exactly one condition.

Sorted unique entries: [{ "atMs": 200, "button": true }]. Button starts false; changes apply before transitions at that millisecond.

PreviewDefault inputs
02

Model output

Deterministic 1 ms trace

Button input and LED output traceTwo digital traces show low and high levels over the simulated duration.ButtonLED0 ms2000 ms
Orange is LED output; ink is button level. The event table is the exact numeric fallback.
Simulation summary
QuantityValueUnit / meaning
Samples2001one sample per ms, including t = 0
Transitions4first matching transition per step
Final stateONstate name
Final buttonfalselogic level
Final LEDtruemodeled output only
Exact transition events (numeric fallback)
TimeFrom → toConditionButtonLED
500 msON → OFFafter 500 msfalsefalse
1000 msOFF → ONafter 500 msfalsetrue
1500 msON → OFFafter 500 msfalsefalse
2000 msOFF → ONafter 500 msfalsetrue

Assumptions

  • The input is parsed as data with JSON.parse; it is never evaluated as code.
  • Timeline changes occur before transition matching at the same timestamp.
  • State elapsed time resets on transition, and transition-array order is deterministic priority.

Excluded effects

  • A discrete 1 ms finite-state model, not firmware, MCU timing, pin-electrical, or MicroPython emulation.
  • Button transitions are level-triggered. Contact bounce, debounce, interrupts, scheduling jitter, and electrical thresholds are excluded.
  • At most one deterministic transition occurs per simulated millisecond; the first matching transition wins.
03

Evidence

Predict, observe, keep the mismatch

Unbound notesThese notes are retained as evidence, but are not attached to model parameters and cannot be exported as a report.

Notes stay in this browser only when you choose save. There is no backend and no secret storage; do not enter credentials or private keys.