HexapiBackground.IK.InverseKinematics.ConfigureFootSwitches C# (CSharp) Méthode

ConfigureFootSwitches() private méthode

private ConfigureFootSwitches ( ) : void
Résultat void
        private async void ConfigureFootSwitches()
        {
            try
            {
                _gpioController = GpioController.GetDefault();
            }
            catch (Exception e)
            {
                await _display.WriteAsync(e.Message);
                return;
            }

            if (_gpioController != null)
            {
                _legGpioPins[0] = _gpioController.OpenPin(26);
                _legGpioPins[1] = _gpioController.OpenPin(19);
                _legGpioPins[2] = _gpioController.OpenPin(13);
                _legGpioPins[3] = _gpioController.OpenPin(16);
                _legGpioPins[4] = _gpioController.OpenPin(20);
                _legGpioPins[5] = _gpioController.OpenPin(21);

                foreach (var legGpioPin in _legGpioPins)
                {
                    legGpioPin.DebounceTimeout = new TimeSpan(0, 0, 0, 0, 1);
                    legGpioPin.SetDriveMode(GpioPinDriveMode.InputPullUp);
                }
            }
            else
            {
                await _display.WriteAsync("No Gpio?");
            }
        }