bpod_core.com.SerialDevice
- class bpod_core.com.SerialDevice
Bases:
AbstractContextManagerClass that interfaces with a USB serial device.
- __init__(port, *, open_connection=True) None
Initialize the serial device.
- Parameters:
- Raises:
serial.SerialException – If the specified port does not exist.
- Return type:
None
- close() None
Close the serial connection.
If the connection is already closed, this method does nothing.
- Raises:
serial.SerialException – If the connection cannot be closed.
- Return type:
- open() None
Open the serial connection.
If the connection is already open, this method does nothing.
- Raises:
serial.SerialException – If the connection cannot be opened.
- Return type: