added ArduinoListener.onStateChange()