Run a finite state machine on an arudino and interact with it from Python