Skip to main content

Meadow.Foundation.Grove.Sensors.Switches.Tilt

Tilt
StatusStatus badge: working
Source codeGitHub
NuGet packageNuGet Gallery for Meadow.Foundation.Grove.Sensors.Switches.Tilt

Code Example

Tilt tiltSwitch;

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

tiltSwitch = new Tilt(Device.Pins.D13);

tiltSwitch.Changed += (s, e) =>
{
Resolver.Log.Info(tiltSwitch.IsOn ? "Switch is High" : "Switch is Low");
};

return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

TiltMeadow Pin
GNDGND
VCC3.3V
RXD01
TXD00

Class Tilt

Represents a Tilt

Assembly: Tilt.dll
View Source
Declaration
public class Tilt : SpdtSwitch, ISwitch, ISensor<bool>, ISensor, IDisposable

Inheritance: System.Object -> Meadow.Foundation.Sensors.Switches.SpdtSwitch

Implements:
Meadow.Peripherals.Switches.ISwitch, Meadow.Peripherals.Sensors.ISensor<System.Boolean>, Meadow.Peripherals.Sensors.ISensor, System.IDisposable

Implements

  • Meadow.Peripherals.Switches.ISwitch
  • Meadow.Peripherals.Sensors.ISensor<System.Boolean>
  • Meadow.Peripherals.Sensors.ISensor
  • System.IDisposable