Relay Class

Definition

Relay module

C#
public class Relay : Iot.Device.GrovePiDevice.Sensors.DigitalOutput
Inheritance

Constructors

Properties

IsInverted

If inverted, the relay is on when output is low and off when output is high

IsOn

True when the relay is on

SensorName

Get the name Relay

Value

Get/set the state of the relay, 0 for off, 1 for on. Wehn set, anything not 0 will be considered as on

Methods

Off()

Switch off the relay

On()

Switch on the relay

ToString()

Get "On" when relay if on and "Off" when relay is off

Applies to

Product Versions
.NET IoT Libraries 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 2.0.0, 2.1.0, 2.2.0