public IActionResult Off([FromBody] string action)
        {
            IActionResult result = Ok();

            try
            {
                switch (action.ToLower())
                {
                case "red":
                    mLedControl.RedLedOff();
                    break;

                case "yellow":
                    mLedControl.YellowLedOff();
                    break;

                case "green":
                    mLedControl.GreenLedOff();
                    break;

                case "all":
                    mLedControl.TurnAllLedsOff();
                    break;

                default:
                    result = BadRequest($"led action {action} not known");
                    break;
                }
            }
            catch (Exception ex)
            {
                result = BadRequest(ex);
            }

            return(result);
        }
 private void StopStateMachine()
 {
     mLedControl.TurnAllLedsOff();
     mFlusherMotor.Stop();
     mStateMachineIsRunning = false;
 }