Interfacing and polling a blackbox toolkit asynchronously with the main thread: technical advice

Hi guys,
We recently acquired a blackbox toolkit and I was wondering about the best way to (1) interface it within psychopy and (2) poll it asynchronously with the main thread. The device doesn’t seem to have an onboard clock, so for (2), I am thinking of using iohub, but peharps the new keyboard function from psychtoolbox can do the job?
Best,
Mat

Hi @Servant_Mathieu, we have a black box tool kit (BBTK) module in PsychoPy. We have used it for timing checks, where the BBTK records stimuli onset, TTL pulses, etc and can also response to visual stimuli.

I can share the code for using the DSCAR, DSRE and DSC modes on the BBTK, but I do not know what you are trying to achieve, so it may not be useful for you.

Ok, so the button box from bbtk is recognized as a standard HID keyboard. Since PsychoPy’s new keyboard function directly polls to the USB HID library, it works perfectly.
It’s very nice: you don’t need any additional code/driver etc…