Skip to main content

Class PushButton

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

Assembly: Meadow.Foundation.dll
View Source
Declaration
public class PushButton : 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

DebounceDuration

This duration controls the debounce filter. It also has the effect of rate limiting clicks. Decrease this time to allow users to click more quickly.

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

DigitalIn

Returns digital input port

View Source
Declaration
protected IDigitalInterruptPort DigitalIn { get; set; }

Fields

DefaultDebounceDuration

Default Debounce used on the PushButton Input if an InputPort is auto-created

View Source
Declaration
public static readonly TimeSpan DefaultDebounceDuration

DefaultGlitchDuration

Default Glitch Filter used on the PushButton Input if an InputPort is auto-created

View Source
Declaration
public static readonly TimeSpan DefaultGlitchDuration

Implements

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