private void ValueChangedOnInputPin(GpioPin sender, GpioPinValueChangedEventArgs args) { switch (args.Edge) { case GpioPinEdge.FallingEdge: PinValueInputChangedLow?.Invoke(this, EventArgs.Empty); break; case GpioPinEdge.RisingEdge: PinValueInputChangedHigh?.Invoke(this, EventArgs.Empty); break; default: throw new ArgumentOutOfRangeException(); } }
private void OnNewDataReceivedFromSensor(object sender, EventArgs args) { _pinHigh = false; PinValueInputChangedLow?.Invoke(this, EventArgs.Empty); }