Meadow.Foundation.Grove.Sensors.Buttons.Button
Button | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
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
Button | Meadow Pin |
---|---|
GND | GND |
VCC | 3.3V |
RX | D01 |
TX | D00 |
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