# Connecting a black box toolkit response pad to psychopy and checking its accuracy

**URL:** <https://discourse.psychopy.org/t/connecting-a-black-box-toolkit-response-pad-to-psychopy-and-checking-its-accuracy/29288>\
**Category:** Builder\
**Created:** [May 24, 2022, 12:14pm UTC](https://discourse.psychopy.org/t/connecting-a-black-box-toolkit-response-pad-to-psychopy-and-checking-its-accuracy/29288 "2022-05-24T12:14:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![azizAkkaya](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/azizakkaya/32/33961_2.png) [@azizAkkaya](https://discourse.psychopy.org/u/azizAkkaya)\
**Post date:** [May 24, 2022, 12:14pm UTC](https://discourse.psychopy.org/t/connecting-a-black-box-toolkit-response-pad-to-psychopy-and-checking-its-accuracy/29288/1 "2022-05-24T12:14:23Z")

</div>

Hi everyone,

I am trying to collect data with a black box toolkit response pad in psychopy. I am not good at coding and relatively new to psychopy. Here are the questions:

1. Normally the reponse pad works just like a regular keyboard. But I could not be sure if the accuracy of reaction time will be preserved with a keyboard component. Or do I need to use the io labs component or cedrus component?

2. If I need to use the io labs component, how do I change the allowed key presses. io labs have (0,1,2,3,4,5,6,7) as the default active buttons. However, black box toolkit response pad has buttons associated with a,s,d,f key presses. So, should I change (0,1,2,3,4,5,6,7) to (a,s,d,f) or a subset of that if for example I want to allow only two keys in the response box?

3. Lastly, how can I check whether the response pad is working as accurately as it should? Is there a piece of code or a procedure to check that on psychopy?

Thanks in advance

Aziz Akkaya

NOTE: as a side note, the experimental paradigm I will be using is Implicit association test. So participants will need to press one of two keys.

---

<div class="post-metadata">

**Author:** ![jon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jon/32/22_2.png) [@jon](https://discourse.psychopy.org/u/jon)\
**Post date:** [May 26, 2022, 10:40am UTC](https://discourse.psychopy.org/t/connecting-a-black-box-toolkit-response-pad-to-psychopy-and-checking-its-accuracy/29288/3 "2022-05-26T10:40:25Z")

</div>

Just to be clear about the device, are we talking about one of these?  
[Millisecond accurate USB response pad that works like a standard keyboard key features](https://www.blackboxtoolkit.com/urp.html)

If so, that should be used as a regular keyboard. Make sure your input is set to use either psychtoolbox or iohub (NOT pyglet event module) and your timings should then certainly be sub-millisecond precision.

To test that’s working, the only way I’ve ever done it is using the robot actuator from BBTK to simulate button presses at a known time, in conjunction with a photodiode on the screen.I believe you can also use keypress detectors slipped under the button and check that the time from PsychoPy matches the time reported by BBTK but I haven’t used that system myself. Either way, it requires careful study of the manual from BBTK 😉

best wishes  
Jon

---

<div class="post-metadata">

**Author:** ![azizAkkaya](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/azizakkaya/32/33961_2.png) [@azizAkkaya](https://discourse.psychopy.org/u/azizAkkaya)\
**Post date:** [May 30, 2022, 6:12am UTC](https://discourse.psychopy.org/t/connecting-a-black-box-toolkit-response-pad-to-psychopy-and-checking-its-accuracy/29288/5 "2022-05-30T06:12:05Z")

</div>

Sorry for the late reply.  
Yes, it is the one. And thanks for the info.  
Frankly, I am new to both psychopy/python and response pads. So, I need some introduction to the concepts and issues around it. Do you have any recommendations for me to get started about the things you mentioned? It can be books, tutorials etc.

Thanks in advance  
Best  
Aziz

---

<div class="post-metadata">

**Author:** ![jon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jon/32/22_2.png) [@jon](https://discourse.psychopy.org/u/jon)\
**Post date:** [May 30, 2022, 10:10am UTC](https://discourse.psychopy.org/t/connecting-a-black-box-toolkit-response-pad-to-psychopy-and-checking-its-accuracy/29288/6 "2022-05-30T10:10:54Z")

</div>

If you’re wanting to run tests of the timing then, as I say, you should read the _BBTK manual_

---

<div class="post-metadata">

**Author:** ![azizAkkaya](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/azizakkaya/32/33961_2.png) [@azizAkkaya](https://discourse.psychopy.org/u/azizAkkaya)\
**Post date:** [May 30, 2022, 10:31am UTC](https://discourse.psychopy.org/t/connecting-a-black-box-toolkit-response-pad-to-psychopy-and-checking-its-accuracy/29288/7 "2022-05-30T10:31:29Z")

</div>

Thank you Jon. I will definitely check it.

Best  
Aziz

---

<div class="post-metadata">

**Author:** ![rongmu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/rongmu/32/983_2.png) [@rongmu](https://discourse.psychopy.org/u/rongmu)\
**Post date:** [June 2, 2022, 10:24am UTC](https://discourse.psychopy.org/t/connecting-a-black-box-toolkit-response-pad-to-psychopy-and-checking-its-accuracy/29288/8 "2022-06-02T10:24:34Z")

</div>

Hi, I got a BBTK response pad recently and plan to use that with PsychoPy. I wonder if you could elaborate on what configuration should be made in PsychoPy?

> [@jon](#):
>
> If so, that should be used as a regular keyboard. Make sure your input is set to use either psychtoolbox or iohub (NOT pyglet event module) and your timings should then certainly be sub-millisecond precision.

Can we just use the regular keyboard component? How do you set the input to use psychtoolbox or iohub (I couldn’t find the option in keyboard’s dialog)? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![jon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jon/32/22_2.png) [@jon](https://discourse.psychopy.org/u/jon)\
**Post date:** [June 6, 2022, 12:27pm UTC](https://discourse.psychopy.org/t/connecting-a-black-box-toolkit-response-pad-to-psychopy-and-checking-its-accuracy/29288/9 "2022-06-06T12:27:35Z")

</div>

Yes, just use as a keyboard. You can set your preferred method using  
Experiment Settings \> Input like this. Both ioHub and PsychToolbox have excellent timing, running in a separate process to your experiment and timestamping the keypresses when they are made (rather than just when they’re used)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/b/1/b17bbaf6b97ce43f8711a9eb321e3e8f54e4ff88.jpeg)

---

<div class="post-metadata">

**Author:** ![rongmu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/rongmu/32/983_2.png) [@rongmu](https://discourse.psychopy.org/u/rongmu)\
**Post date:** [June 6, 2022, 4:08pm UTC](https://discourse.psychopy.org/t/connecting-a-black-box-toolkit-response-pad-to-psychopy-and-checking-its-accuracy/29288/10 "2022-06-06T16:08:55Z")

</div>

Thank you very much for your explanation!
