async void Start()
    {
        var peripherals = await new NearScanner(12).Scan();
        var cubes       = await new CubeConnecter().Connect(peripherals);

        for (var i = 0; i < cubes.Length; i++)
        {
            var container = (i == 0) ? _targetCubes : (i == 1) ? _attractionCubes : _repulsionCubes;
            container.Add(cubes[i]);
        }
        ToioUtils.SetLEDColorToCubeList(_targetCubes, Color.blue);
        ToioUtils.SetLEDColorToCubeList(_attractionCubes, Color.green);
        ToioUtils.SetLEDColorToCubeList(_repulsionCubes, Color.red);

        _startStopButtonText.text     = "Start";
        _startStopButton.interactable = true;
        _startStopButton.onClick.AddListener(() =>
        {
            if (_isControlling)
            {
                StopControl();
            }
            else
            {
                StartControl();
            }
        });
    }
 public bool StartControl()
 {
     if (_controlLoop != null)
     {
         return(false);
     }
     ToioUtils.SetLEDColorToCubeList(_targetCubes, Color.blue);
     _controlLoop = StartCoroutine(ControlLoop());
     _startStopButtonText.text = "Stop";
     _isControlling            = true;
     return(true);
 }
 public bool StopControl()
 {
     if (_controlLoop == null)
     {
         return(false);
     }
     ToioUtils.SetLEDColorToCubeList(_targetCubes, Color.gray);
     StopCoroutine(_controlLoop);
     _controlLoop = null;
     _startStopButtonText.text = "Start";
     _isControlling            = false;
     return(true);
 }