Table of Contents

Class Unit4Relay

Namespace
Iot.Device.Relay
Assembly
Iot.Device.Relay.dll

Unit 4 Relay. This module only contains 4 relays and 4 leds. Each can be piloted independly or being in sync.

public class Unit4Relay : Base4Relay
Inheritance
Unit4Relay
Inherited Members

Constructors

Unit4Relay(I2cDevice)

Initializes a new instance of the Unit4Relay class.

public Unit4Relay(I2cDevice i2cDevice)

Parameters

i2cDevice I2cDevice

The I2C device.

Properties

SynchronizedMode

Gets or sets a value indicating whether synchronize the Led with the Relay.

public bool SynchronizedMode { get; set; }

Property Value

bool

Methods

SetAllLedAndRelay(State)

Sets all the Realys and the Leds to the same state.

public void SetAllLedAndRelay(State state)

Parameters

state State

The state On or Off.

SetAllLeds(State)

Sets all the Led in the same state. This preserved the relay state.

public void SetAllLeds(State state)

Parameters

state State

The state On or Off.

SetLed(byte, State)

Sets the state of a specific Led.

public void SetLed(byte number, State state)

Parameters

number byte

The Led number from 0 to 3.

state State

The state On or Off.

Exceptions

ArgumentException

Led number must be between 0 and 3.