Beispiel #1
0
        override protected async Task <GpioState> readPinAsync(int pinId)
        {
            GpioState result = null;
            GpioPin   pin    = controller.GetGpioPinByBcmPinNumber(pinId);

            if (pin != null)
            {
                result       = new GpioState(pinId, 0, DateTime.Now, true);
                result.Value = await pin.ReadLevelAsync();
            }
            return(result);
        }