refactor firmware to trigger commands on newline
removes need for sleep, because commands are triggered on newline