Skip to main content

Meadow.Foundation.Grove.Sensors.Buttons.Touch

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

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

TouchMeadow Pin
GNDGND
VCC3.3V
RXD01
TXD00

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