Circuit Biscuits

Deep Dive 3 - Commands Modes And State

What turns a collection of firmware features into a controllable system?

In This Lesson

Technical Deep Dives

Technical Deep Dive 3 - Commands, Modes, And State

Core Question

What turns a collection of firmware features into a controllable system?

Commands As A Protocol

In this project, the browser and firmware communicate using text commands such as:

  • PING
  • GET_STATUS
  • SET_MODE TIME

This is a protocol. A protocol is a shared agreement about message format and meaning. The browser and firmware do not need the same programming language, but they do need the same command vocabulary.

Modes As Behavioural Context

A mode is a high-level operating state. It is useful because it groups behaviour. Instead of describing every tiny action all the time, the system can say:

  • now I am in clock mode
  • now I am in text mode
  • now I am in sensor mode

This reduces complexity and makes the system easier to reason about.

State As Remembered Information

State is the information the system is currently holding. That includes things like:

  • current mode
  • current text
  • current brightness
  • whether animation is running

Without state, the system would behave as if every moment were independent. With state, it can behave consistently over time.

Why This Matters

Commands change state, and state shapes behaviour. That relationship is one of the central ideas of the whole course.