Relay
Python Library for Solid State Relays.
Python Library
Turta_Relay library is responsible for controlling solid state relays.
Initialization
Add the following statement to the top of your Python code.
Then, create an instance of the RelayController class.
Now you're ready to access the library by calling its instance.
Basic Members
Write (Control) Relay
Controls the relay.
Parameters
Byte ch: Relay channel. (1 or 2.)
Bool st: Relay state. (True or False.)
Returns
None
Toggle Relay
Inverts the relay's state.
Parameters
Byte ch: Relay channel. (1 or 2.)
Returns
None
Read Relay State
Reads the relay state.
Parameters
Byte ch: Relay channel. (1 or 2.)
Returns
Bool: Relay state. (True or False.)
Finalizer
When exiting from the program, the library turns off the relays and then releases the GPIO pins.
Last updated