I just finished a state machine framework for Arduino inspired by the state machine series of blogs by Bill Earl.
- 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:
https://github.com/tinkerspy/Automaton/wiki
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.
I also created a state machine library to easily build menus on the Adafruit RGB LCD display (available under by Github profile), but that's not documented yet.
Please have a look and tell me what you think.
Automaton: multitasking state machine framework
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Tinkerspy
- Posts: 2
- Joined: Mon Sep 21, 2015 4:05 pm
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Automaton: multitasking state machine framework
Nice work! Thanks for posting.
Please be positive and constructive with your questions and comments.