-
Notifications
You must be signed in to change notification settings - Fork 607
Description
After I open a pin:
var pinMode = PinMode.Input;
Log($"Requesting GPIO Controller pin:{applicationConfiguration.ValveMonitoredOnGpioPin} to open in PinMode of:{pinMode}");
gpioController!.OpenPin(applicationConfiguration.ValveMonitoredOnGpioPin, pinMode);
pinOpened = true;
Log($"GPIO Controller pin:{applicationConfiguration.ValveMonitoredOnGpioPin} has opened with PinMode:{pinMode}");
and register a callback on a GPIO PIN 21 (using Raspberry PI 2w, on Linux X64).
gpioController.RegisterCallbackForPinValueChangedEvent(
applicationConfiguration.ValveMonitoredOnGpioPin,
PinEventTypes.Falling | PinEventTypes.Rising,
OnPinEvent);
I get this response when circuit closes (Rising = Dispersed is the circuit closed, and Falling = Charged for when the circuit is open)

For what I know, when the circuit closes, the power is a constant 3.3V until the circuit opens and falls to zero.
My expected behaviour is a rising event when the circuit closes and a falling event when the circuit opens, and not having to de-bounce the messages between rising and falling when power is on (which is very difficult to ensure the order is maintained). Is this expected behaviour or not when the circuit is closed for a GPIO Pin?
I have a step-down device that drops the voltage from 9V (battery supplied) down to 3.3V. When there is no power, there are no events generated. This is my first IOT project, and I apologize if I'm missing something fundamental here.