Relay Class
Definition
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 class to support relays
public class Relay : Iot.Device.GoPiGo3.Sensors.DigitalOutput
type Relay = class
inherit DigitalOutput
Public Class Relay
Inherits DigitalOutput
- Inheritance
- Derived
Constructors
Relay(GoPiGo, GrovePort) |
Creates a new instance of Relay. |
Relay(GoPiGo, GrovePort, Boolean) |
Creates a new instance of Relay. |
Properties
IsInverted |
If inverted, the relay is on when output is low and off when output is high |
Port |
Grove port (Inherited from DigitalOutput) |
SensorName |
Get the sensor 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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for