# Finite State Machine (FSM) with delay

**URL:** <https://discourse.nodered.org/t/finite-state-machine-fsm-with-delay/88275>\
**Category:** Share Your Projects\
**Created:** [26 May 2024 09:06 UTC](https://discourse.nodered.org/t/finite-state-machine-fsm-with-delay/88275 "2024-05-26T09:06:06Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [28 May 2024 07:47 UTC](https://discourse.nodered.org/t/finite-state-machine-fsm-with-delay/88275/7 "2024-05-28T07:47:10Z")

</div>

Over the weekend, someone asked me for further details/examples of FSM.

I've found a couple of old threads I posted on the forum. Here are the links...

> [@Matt's Mathematical Magic Machine (M4)](https://discourse.nodered.org/t/matts-mathematical-magic-machine-m4/19775):
>
> This is just pure fun!!! Think of a number between 1 and 15 and this magical machine will find out what it is for you. Here's the magical code with an embedded FSM (it uses the node ui\_table which you may need to install). I've used the 'dark theme' for the dashboard. You might want to change the (yellow) font colour. [{"id":"c54a85f8.963e","type":"subflow","name":"Card\_4","info":"","c…

> [@Is anyone here interested in Train Signals and how they work?](https://discourse.nodered.org/t/is-anyone-here-interested-in-train-signals-and-how-they-work/19759/24):
>
> Got a bit bored this afternoon so I knocked-up this demo flow. It has a finite state machine (FSM) for each of the 6 signals and an animated slider to mimic a train journey. To keep things simple there is only one buffer block (caution block) - you can obviously modify that by introducing additional blocks and signals. BOD means Block Occupancy Detector. Hope you find it useful. The Node-RED flow is below as together with the screenshots it …

---

_[View the full topic](https://discourse.nodered.org/t/finite-state-machine-fsm-with-delay/88275)._
