GpioPin.ValueChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the value of the general-purpose I/O (GPIO) pin changes, either because of an external stimulus when the pin is configured as an input, or when a value is written to the pin when the pin is configured as an output.
// Register
event_token ValueChanged(TypedEventHandler<GpioPin, GpioPinValueChangedEventArgs const&> const& handler) const;
// Revoke with event_token
void ValueChanged(event_token const* cookie) const;
// Revoke with event_revoker
GpioPin::ValueChanged_revoker ValueChanged(auto_revoke_t, TypedEventHandler<GpioPin, GpioPinValueChangedEventArgs const&> const& handler) const;
public event TypedEventHandler<GpioPin,GpioPinValueChangedEventArgs> ValueChanged;
function onValueChanged(eventArgs) { /* Your code */ }
gpioPin.addEventListener("valuechanged", onValueChanged);
gpioPin.removeEventListener("valuechanged", onValueChanged);
- or -
gpioPin.onvaluechanged = onValueChanged;
Public Custom Event ValueChanged As TypedEventHandler(Of GpioPin, GpioPinValueChangedEventArgs)
Event Type
Windows requirements
App capabilities |
lowLevel
|