Skip to content

New (better) State Machine example: Garage Door Keypad #11

@JoshOrndorff

Description

@JoshOrndorff

If the user enters the correct 4 digits, the door opens (or closes if it was already open).
The thing is, you could enter some random digits before you enter the correct code, and it would still open after the correct code.
As you sketch your states, be sure to handle that correctly.

This example is drawn from https://eng.libretexts.org/Under_Construction/Book%3A_Discrete_Structures/09%3A_Finite-State_Automata/9.02%3A_State_Transition_Diagrams which has many other excellent examples

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions