#include <Relays-SOLDERED.h>
Inherits EasyC.
|
| | CH_Relay (int _pin1, int _pin2=-1, int _pin3=-1, int _pin4=-1) |
| | Sensor specific native constructor for 2 channel board.
|
| | CH_Relay () |
| | Constructor for relay control.
|
| void | relayControl (int channel, int mode) |
| | relayControl send two bytes of data to relay to turn it on or off
|
| int | getChannelState (int channel) |
| | getChannelState returns if a relay channel has been turned on or off
|
| | EasyC () |
| | Main constructor for easyC version.
|
| void | begin () |
| | Initializes sensors on native or easyC on default address.
|
| void | begin (uint8_t _address) |
| | Initializes sensors on supplied i2c address.
|
| int | sendAddress (char regAddr) |
| | Private function to send a single byte to sensor.
|
| int | readData (char a[], int n) |
| | Private function to read n bytes over i2c.
|
| int | readRegister (char regAddr, char a[], size_t n) |
| | Private function to send over i2c and then read n bytes.
|
| int | sendData (const uint8_t *a, int n) |
| | Private function to write n bytes over i2c.
|
|
| void | initializeNative () |
| | Overloaded function for virtual in base class to initialize sensor specific.
|
|
| void | setChannelState (int channel, int mode) |
| | setChannelState saves locally the last set state olf a specific relay
|
◆ CH_Relay() [1/2]
| CH_Relay::CH_Relay |
( |
int | _pin1, |
|
|
int | _pin2 = -1, |
|
|
int | _pin3 = -1, |
|
|
int | _pin4 = -1 ) |
Sensor specific native constructor for 2 channel board.
- Parameters
-
| int | _pin Example parameter. |
◆ CH_Relay() [2/2]
Constructor for relay control.
◆ getChannelState()
| int CH_Relay::getChannelState |
( |
int | channel | ) |
|
getChannelState returns if a relay channel has been turned on or off
- Parameters
-
- Returns
- either HIGH or LOW
◆ initializeNative()
| void CH_Relay::initializeNative |
( |
| ) |
|
|
protectedvirtual |
Overloaded function for virtual in base class to initialize sensor specific.
Implements EasyC.
◆ relayControl()
| void CH_Relay::relayControl |
( |
int | channel, |
|
|
int | mode ) |
relayControl send two bytes of data to relay to turn it on or off
- Parameters
-
| int | channel sends channel pin to relay |
| int | mode sends HIGH or LOW to relay |
◆ setChannelState()
| void CH_Relay::setChannelState |
( |
int | channel, |
|
|
int | mode ) |
|
private |
setChannelState saves locally the last set state olf a specific relay
- Parameters
-
| int | channel, specific relay channel |
| int | mode either HIGH or LOW |
◆ channelState
| int CH_Relay::channelState[4] = {0,0,0,0} |
|
private |
◆ pin1
◆ pin2
◆ pin3
◆ pin4
The documentation for this class was generated from the following files: