Photocoupler
Python Library for Photocouplers.
Python Library
Turta_Photocoupler library is responsible for reading input states from the photocoupler.
Initialization
Add the following statement to the top of your Python code.
Then, create an instance of the PhotocouplerInputs class.
Now you're ready to access the library by calling its instance.
Basic Members
Read
Reads the photocoupler input state.
Parameters
Byte ch: Photocoupler channel. (1 or 2.)
Returns
Bool: Photocoupler input state. (True for high, False for low.)
Finalizer
When exiting from the program, the library releases the GPIO pins.
Last updated