Wanted: Simple state machine examples

Try these links... for ideas...

You can code an FSM using 'case' constructs in pure JavaScript.

There are also a number of Node-RED Nodes that implement FSMs...
(I've not used them as I code mine in JS), here is just one as an example...
Do a search for FSM in the flows library tab - you'll find countless nodes.

Finally, here's a link to a tutorial on FSMs I wrote for my IoT students a few years ago...

4 Likes