Skip to main content

Meadow.Foundation.Grove.Sensors.Switches.SwitchP

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

Code Example

SwitchP groveSwitch;

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

groveSwitch = new SwitchP(Device.Pins.D13);

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

return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

SwitchPMeadow Pin
GNDGND
VCC3.3V
RXD01
TXD00