Relay Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Relay module
C#
public class Relay : Iot.Device.GrovePiDevice.Sensors.DigitalOutput
type Relay = class
inherit DigitalOutput
Public Class Relay
Inherits DigitalOutput
- Inheritance
Relay(Grove |
Relay constructor |
Relay(Grove |
Relay constructor |
Is |
If inverted, the relay is on when output is low and off when output is high |
Is |
True when the relay is on |
Sensor |
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 |
Off() |
Switch off the relay |
On() |
Switch on the relay |
To |
Get "On" when relay if on and "Off" when relay is off |
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 |