Skip to main content

Meadow.Foundation.Grove.Sensors.Buttons.Button

Button
StatusStatus badge: working
Source codeGitHub
NuGet packageNuGet Gallery for Meadow.Foundation.Grove.Sensors.Buttons.Button

Code Example

Button button;

public override Task Initialize()
{
Resolver.Log.Info("Initialize...");

button = new Button(Device.Pins.D13)
{
LongClickedThreshold = TimeSpan.FromMilliseconds(1500)
};

button.Clicked += (s, e) => Resolver.Log.Info("Grove Button clicked");

button.LongClicked += (s, e) => Resolver.Log.Info("Grove Button long clicked");

return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

ButtonMeadow Pin
GNDGND
VCC3.3V
RXD01
TXD00

Class Button

Represents a Push Button

Assembly: Button.dll
View Source
Declaration
public class Button : PushButton, IButton, ISensor<bool>, ISensor, IDisposable

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

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

Implements

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