move command handling to separate functions
notify digital input pins value when it's changed