implement switch from PIC to AVR for heartbeat detector