Skip to main content

Class Relay

Electrical switch (usually mechanical) that switches on an isolated circuit.

Assembly: Meadow.Foundation.dll
View Source
public class Relay : IRelay

Implements:
Meadow.Peripherals.Relays.IRelay

Properties

DigitalOut

Returns digital output port

View Source
protected IDigitalOutputPort DigitalOut { get; set; }

Type

Returns type of relay.

View Source
public RelayType Type { get; protected set; }

State

Whether or not the relay is on. Setting this property will turn it on or off.

View Source
public RelayState State { get; set; }

Methods

Toggle()

Toggles the relay on or off.

View Source
public void Toggle()

Events

OnChanged

Event raised after relay state change

View Source
public event EventHandler<RelayState> OnChanged
Event Type

System.EventHandler<Meadow.Peripherals.Relays.RelayState>

Implements

  • Meadow.Peripherals.Relays.IRelay