I just finished a state machine framework for Arduino.
- It provides a framework that makes your sketches event based
- Unlike the other Arduino state machine libraries it uses a table driven state machine concept in which every machine is an self contained object
- It allows you to define state machines that can be shared as stand alone Arduino libraries (dependent only upon Automaton)
- It comes with a collection of predefined reusable state machines for handling buttons, blinking and fading leds, detecting pulses, monitoring analog inputs, timers and receiving commands over serial communications.
- State machines can communicate with each other via messaging queues.
It can be installed from the Arduino IDE’s library manager or downloaded from https://github.com/tinkerspy/Automaton
Extensive documentation and a tutorial are available here:
I think it provides a new way of using state machines on Arduino that makes it easy to build multi tasking applications with simple building blocks. It certainly helped me to write clearer and more stable applications.
Please have a look and tell me what you think.
(I’m not a novice programmer, but this is my first attempt at an Arduino library)