Hi all,
I’m currently coding tasks that connect to an fMRI and I need to use a serial.Pstbox in ioHub to receive triggers and button responses. I’ve tried doing this by using launchHubServer [io = launchHubServer(**iohubkwargs)], but I always get an error that I can’t do this because an existing ioHub connection is active (“raise RuntimeError('An existing ioHubConnecton is already open.”)).
This active connections appears to be the default for the keyboard backend using ioHub, and indeed I can get my launchHubServer code to work when I switch the keyboard backend (in the input tab of the experiment options) to be PsychToolBox.
The error states I can use “ioHubConnection.getActiveConnection” to access this existing connect but I can’t seem to find documentation or an example on how to actually do this.
Does anyone have any insight on how I can add the Pstbox to the existing IO hub connection?
Thanks in advance for your help!