---
title: "#37 State Machines Part-3: Input-Driven State Machines"
url: https://daily.dev/posts/37-state-machines-part-3-input-driven-state-machines-9knabtdjj
source_url: https://www.youtube.com/watch?v=E2Im7jLDDG4
type: video:youtube
source: "Quantum Leaps"
published: 2026-05-31T07:45:32.453Z
updated: 2026-05-31T07:57:24.626Z
tags: ["c", "embedded"]
reading_time: 31
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# #37 State Machines Part-3: Input-Driven State Machines

**[Quantum Leaps](https://daily.dev/sources/quantum-leaps)** · 31 min read · 0 upvotes · 0 comments

## Summary

A deep dive into input-driven state machines for embedded software, tracing their origins from Mealy and Moore hardware state machines in the 1950s. Explains how hardware concepts like synchronous circuits, truth tables, and state diagrams translate into software. Contrasts input-driven (polling) state machines with event-driven state machines, covering key differences in execution model, race condition risks, and input buffering. Includes hands-on coding on an Arduino-like board implementing a blinky+button state machine, demonstrating input buffering, guard conditions, and the spectrum from input-driven to fully event-driven designs. Discusses practical use cases for each approach including games, robotics, and debouncing.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=E2Im7jLDDG4>

---

Tags: [#c](https://daily.dev/tags/c), [#embedded](https://daily.dev/tags/embedded)

[View this post on daily.dev](https://daily.dev/posts/37-state-machines-part-3-input-driven-state-machines-9knabtdjj)
