# Finite State Machine (FSM) - UK traffic lights

**URL:** https://discourse.nodered.org/t/finite-state-machine-fsm-uk-traffic-lights/1580
**Category:** Share Your Projects
**Created:** [15 July 2018 11:35 UTC](https://discourse.nodered.org/t/finite-state-machine-fsm-uk-traffic-lights/1580 "2018-07-15T11:35:41Z")
**Posts on this page:** 2
**Page:** 1

<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: [15 July 2018 11:35 UTC](https://discourse.nodered.org/t/finite-state-machine-fsm-uk-traffic-lights/1580/1 "2018-07-15T11:35:41Z")

</div>

[UK traffic lights and FSM](http://resources-area.co.uk/node-red-flows/traffic_lights_and_fsm.pdf)

The above link will take you to a tutorial about Finite State Machines (FSM).  
The model is based on the UK traffic light sequence.

Here's a link to the Node-RED flow.

[Node-RED flow](http://resources-area.co.uk/node-red-flows/fsm_traffic_lights.txt)

Trust you enjoy reading the tutorial.

---

<div class="post-metadata">

### Author: ![ncherry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ncherry/32/27_2.png) [@ncherry](https://discourse.nodered.org/u/ncherry)
#### Post date: [15 July 2018 12:32 UTC](https://discourse.nodered.org/t/finite-state-machine-fsm-uk-traffic-lights/1580/2 "2018-07-15T12:32:46Z")

</div>

Ooo, thanks,

I just did something like this with my node-red-node-mytimeout node (a countdown timer). I'll compare your class to my node to see if I can make any improvements on my node.
