Examples

Runnable example projects for the eparch library. Each example is a self-contained Gleam project with unit / integration tests.

cd examples/<example>
gleam test

State Machine (gen_statem)

ExampleDescription
01-push-buttonBasic state transitions, synchronous calls, press counter
02-door-lockShows how to use with_state_enter, StateTimeout for auto-lock, wrong-code tracking

Push-Button

The canonical OTP gen_statem example from the official docs.

Door Lock

A code-protected door lock.

Event Handler (gen_event)

Coming soon.

Search Document