added customizable protocols support, fixed led blinking bug