OC03 Module¶
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.
Data Sheets:
OC03 class¶
class OC03¶
class OC03(self, drvname, addr = PCA9554A_I2C_ADDRESS, clk = 100000)
Create an instance of the OC03 class.
Arguments:
- drvname – I2C Bus used ‘( I2C0, … )’
- addr – Slave address, default 0x38
- clk – Clock speed, default 100kHz
OC03.init¶
init(self, pins = PCA9554A_ALL_OUTPUTS_OFF)
Configures PCA9554A and sets all outputs False by default.
Arguments: pins – initializes the relay state. Accepts True (relay closed) and False (relay open).
OC03.writePin¶
writePin(self, state)
Determines the status of the relay output
Arguments: state – accepts True (relay closed) and False (relay open).
OC03.getStatus¶
getStatus(self)
Reads the status of the relay.
returns the status of the relay.