Skip to main content

Meadow.Foundation.Sensors.Buttons.PollingPushButton

PollingPushButton
StatusStatus badge: working
Source codeGitHub
NuGet packageNuGet Gallery for Meadow.Foundation

Class PollingPushButton

Represents a momentary push button with two states that uses polling to detect state change

Assembly: Meadow.Foundation.dll
View Source
Declaration
public class PollingPushButton : PushButtonBase, IButton, ISensor<bool>, ISensor, IDisposable

Inheritance: System.Object -> Meadow.Foundation.Sensors.Buttons.PushButtonBase

Implements:
Meadow.Peripherals.Sensors.Buttons.IButton, Meadow.Peripherals.Sensors.ISensor<System.Boolean>, Meadow.Peripherals.Sensors.ISensor, System.IDisposable

Properties

ButtonPollingInterval

The button state polling interval for PushButton instances that are created from a port that doesn't have an interrupt mode of EdgeBoth - otherwise ignored

View Source
Declaration
public TimeSpan ButtonPollingInterval { get; set; }

Fields

ctsPolling

Cancellation token source to disable button polling on dispose

View Source
Declaration
protected CancellationTokenSource? ctsPolling

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

View Source
Declaration
public override void Dispose()

Implements

  • Meadow.Peripherals.Sensors.Buttons.IButton
  • Meadow.Peripherals.Sensors.ISensor<System.Boolean>
  • Meadow.Peripherals.Sensors.ISensor
  • System.IDisposable