# Image selection by comparison

**URL:** <https://discourse.nodered.org/t/image-selection-by-comparison/91043>\
**Category:** Dashboard\
**Created:** [17 September 2024 11:56 UTC](https://discourse.nodered.org/t/image-selection-by-comparison/91043 "2024-09-17T11:56:35Z")\
**Posts on this page:** 1\
**Showing post:** 25

<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:** [24 September 2024 15:21 UTC](https://discourse.nodered.org/t/image-selection-by-comparison/91043/25 "2024-09-24T15:21:22Z")

</div>

Coding a Finite State Machine (FSM) in pure JavaScript isn't too difficult.  
Here are a couple of examples.

> [@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…

> [@Finite State Machine (FSM) with delay](https://discourse.nodered.org/t/finite-state-machine-fsm-with-delay/88275):
>
> I was asked the other day about how to create a Finite State Machine (FSM) with different delays between various transitions. Here is a simple example, based on the UK traffic light sequence, that makes use of the msg.delay option in the Delay node. Here's a screenshot of the flow. [{"id":"be3ab1ef.3f0a68","type":"tab","label":"Traffic Lights with variable delay","disabled":false,"info":"","env":[]},{"id":"743e732.c12228c","type":"function","z":"be3ab1ef.3f0a68","name":"Decode…

---

_[View the full topic](https://discourse.nodered.org/t/image-selection-by-comparison/91043)._
