Added a heartbeat signal to determine if packets should be sent to the other party. If the heartbeat signal is not received periodically, the node stops sending data on the serial line.