Basic structure of state pattern for a statemachine
StateMachine with very simple test, includes Gpio element
merge