Technical reference · Doc no. STATE-03 · Rev. A state machine

The click pen, proven.

One push-button drives a pen that toggles. The trick is a rotating cam: every release rotates it one notch in the same direction, but the notches alternate between deep (tip in) and shallow (tip out). Step through it and the diagram proves the four-state cycle — no hand-waving.

Method: mechanism = state machine · Not to scale

Buttonpush ▼ Camnotch 0 Tipretracted push release push release Retracted S0 · tip in Depressed S3 · held out Depressed S1 · held in Extended S2 · tip out
S0 · Retracted

Each release rotates the cam +45° — the same way every time. The tip alternates because the seats do.

FIG. 1 Press push, then release · or hit Click! · watch the diagram. The click cycle modelled as states + transitions; the mechanism renders from the current state while the linked diagram lights up the active state and the transition just taken.