SerialDevice

class bpod_core.com.SerialDevice

Bases: AbstractContextManager

Class that interfaces with a USB serial device.

close()

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:

None

open()

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:

None

property port: str

The name of the serial port.

Returns:

The device path of the serial port (e.g., ‘/dev/ttyACM0’).

Return type:

str