Skip to main content

Meadow.Foundation.Grove.Relays.Relay

Relay
StatusStatus badge: working
Source codeGitHub
NuGet packageNuGet Gallery for Meadow.Foundation.Grove.Relays.Relay

Code Example

Relay relay;

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

relay = new Relay(Device.Pins.D13);

return Task.CompletedTask;
}

public override async Task Run()
{
var state = false;

while (true)
{
state = !state;

Resolver.Log.Info($"- State: {state}");
relay.IsOn = state;

await Task.Delay(500);
}
}

Sample project(s) available on GitHub

Wiring Example

RelayMeadow Pin
GNDGND
VCC3.3V
RXD01
TXD00

Class Relay

Represents a Relay

Assembly: Relay.dll
View Source
Declaration
public class Relay : Relay, IRelay

Inheritance: System.Object -> Meadow.Foundation.Relays.Relay

Implements:
Meadow.Peripherals.Relays.IRelay

Implements

  • Meadow.Peripherals.Relays.IRelay