Changes:	add heartbeat logic to led control
		add mode switch and check the value