code: function watchInputs() {
  	var state;
  	state = pfio.read_input();
  	if (state !== prev_state) {
  		EventBus.emit('pfio.inputs.changed', state, prev_state);
  		prev_state = state;
  	}
  	setTimeout(watchInputs, 10);
  }
docs: Watches for state changes