will be read-only starting December 31st, 2018. For more info please look at this Forum Post


Reactive state machine framework for Arduino

The Automaton framework allows you to create Arduino applications that consist entirely of concurrently running components (finite state machines) interacting with one another. Changes are automatically propagated through the application like changes in a spreadsheet.

Automaton components can trigger each other and form intricate control structures. Automaton helps you create your own components, makes them interact with the bundled components to let you control whatever your Arduino or its peripherals are capable of doing.

Comes with bundled state machines for timers, leds, analog inputs, comparators, logical operations, buttons, rotary encoders and a music/pattern sequencer.

Extensive documentation, tutorials and code available at:

Sample code

This simple example demonstrates the use of a led component with a button component to toggle a blinking led when the button is pressed.

#include <Automaton.h>

// Toggle a blinking led (pin 5) with a button (pin 2)

Atm_led led;
Atm_button button;

void setup() {

  led.begin( 5 )
    .blink( 200, 200 ); // Set up a led to blink 200ms/200ms

  button.begin( 2 )
    .onPress( led, led.EVT_TOGGLE_BLINK ); / Toggle the led when button pressed


void loop() {;


Get the Automaton via the Arduino library manager, platformio or the installation page:


  • Cooperative multi tasking state machine base class for building your own components
  • Components are table based state machines, you define the behavior using just a little coding
  • Lightweight machine scheduling class
  • Built in state timers and counters
  • Communication between components via event triggers, connectors and direct method calls.
  • Sleep states to save microcontroller cycles
  • Debugging (state monitor) tracing that lets you see what the components are doing
  • Encourages modular design and separation of concerns
  • Components you create can be shared as stand alone Arduino libraries (dependent only on the Automaton library)
  • Machine template editor to help you create your own state machines


  • Automaton Servo extension
  • Automaton esp8266 extension
  • Automaton Adafruit RGBLCDShield extension


Documentation & tutorials

Documentation for the (Automaton & Machine) base classes and the bundled components is available in the Github wiki:

If you want to make your own components, which is where the real fun is, look at the machine building tutorial: