This is a Module for the OC03 Relay Out Low Voltage. The board is based off the PCA9554A I/O expander manufactured by Texas Instruments. The Module implements the PCA9554A to drive a solid state relay utilizing the OC03 xChip. The board uses I2C for communication.
OC03(self, drvname, addr = PCA9554A_I2C_ADDRESS, clk = 100000)¶
Create an instance of the OC03 class.
- drvname – I2C Bus used ‘( I2C0, ... )’
- addr – Slave address, default 0x38
- clk – Clock speed, default 100kHz
init(self, pins = PCA9554A_ALL_OUTPUTS_OFF)¶
Configures PCA9554A and sets all outputs False by default
Parameters: pins – initializes the relay state. Accepts True (relay closed) and False (relay open)
Determines the status of the relay output
Parameters: state – accepts True (relay closed) and False (relay open)
Reads the status of the relay.
returns the status of the relay.