Meadow.Foundation.Grove.Sensors.Buttons.Touch
Touch | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
Touch touch;
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
touch = new Touch(Device.Pins.D04);
touch.LongClickedThreshold = TimeSpan.FromMilliseconds(1500);
touch.Clicked += (s, e) =>
{
Resolver.Log.Info("Grove Touch pressed");
};
touch.LongClicked += (s, e) =>
{
Resolver.Log.Info("Grove Touch long pressed");
};
return Task.CompletedTask;
}
Sample project(s) available on GitHub
Wiring Example
Touch | Meadow Pin |
---|---|
GND | GND |
VCC | 3.3V |
RX | D01 |
TX | D00 |
Class Touch
Represents a Touch button
Assembly: Touch.dll
View Source
Declaration
public class Touch : 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