bsl.triggers.ParallelPortTrigger#
- class bsl.triggers.ParallelPortTrigger(address, delay=50, *, verbose=True)#
Trigger using a parallel port (also called LPT port).
- Parameters
address (int (hex) | str) – The address of the parallel port on the system. If
'arduino'
, uses an Arduino to LPT converter. Design of the converter can be found here Arduino to ParallelPort converter.delay (int) – Delay in milliseconds until which a new trigger cannot be sent. During this time, the pins remains in the same state.
verbose (bool) – If
True
, display alogger.info
message when a trigger is sent.
Notes
The address is specific to the system. Typical addresses are:
On Linux:
LPT1 = /dev/parport0 LPT2 = /dev/parport1 LPT3 = /dev/parport2
On Windows, common port addresses:
LPT1 = 0x0378 or 0x03BC LPT2 = 0x0278 or 0x0378 LPT3 = 0x0278
macOS does not have support for parallel ports.
- Attributes
Methods
close
()Disconnects the parallel or serial port.
signal
(value)Send a trigger value.
- close()#
Disconnects the parallel or serial port.
This method should free the parallel or serial port and let other application or python process use it.