Current lab
Read the supporting lesson →GPIO state model
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.
02
Model output
Deterministic 1 ms trace
| Quantity | Value | Unit / meaning |
|---|---|---|
| Samples | 2001 | one sample per ms, including t = 0 |
| Transitions | 4 | first matching transition per step |
| Final state | ON | state name |
| Final button | false | logic level |
| Final LED | true | modeled output only |
| Time | From → to | Condition | Button | LED |
|---|---|---|---|---|
| 500 ms | ON → OFF | after 500 ms | false | false |
| 1000 ms | OFF → ON | after 500 ms | false | true |
| 1500 ms | ON → OFF | after 500 ms | false | false |
| 2000 ms | OFF → ON | after 500 ms | false | true |
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.