This video guide is an introduction to the RESPONSEPixx button box, using a data acquisition and synchronization system from VPixx Technologies and our MATLAB-compatible API. Use scripting to cue and record button presses, and to calculate response times relative to a key video event.
The guide first includes a presentation of the construction and functionality of our electronic RESPONSEPixx button boxes and their connection with data acquisition devices, including the DATAPixx, PROPixx, VIEWPixx and VIEWPixx/3D. MATLAB-compatible scripts are provided, and it is possible to follow along the video instruction.
After watching a presentation on the construction and functionality of the RESPONSEPixx, we will write a script in MATLAB that is able to record button presses during a reaction time experiment. We will write the script in three sections and learn key concepts along the way.
- Perform basic interactions with your data acquisition device.
- Record and use a digital input log.
- Restrict recording to specific button presses and cue participants to valid response choices.
Support material can be downloaded from the left sidebar.
Estimated completion time : 30 to 45 minutes.
Construction and functionality of the RESPONSEPixx
Perform basic interactions with your data acquisition device
After installing Psychtoolbox and the DATAPixx toolbox, launch MATLAB. After a brief overview of important DATAPixx toolbox functions, you will be prompted to open a pre-existing MATLAB script containing a basic stimulus loop.
This file is included in the downloaded materials from this session, and is called IntroRPx_StimulusSetup.m.
If you run the script before completing the tutorial, you will only see a static grey image, visible for a short period of time.
Record and use a digital input log
When you are ready to view the next video, you can either continue from your current file or open IntroRPx_DinLog.m. This is an intermediary file that contains placeholder comments that identify where you will write the next few blocs of code. This file can allow you to follow along with the video more easily.
If you are unfamiliar with counting in binary or in hexadecimal, you can use online converters (e.g.,https://codebeautify.org/decimal-binary-converter) to convert between decimal and binary or hexadecimal. MATLAB uses bin2dec()and dec2bin(), as well as hex2dec() and dec2bin() to do these conversions.
Restrict recording to specific button presses and cue participants to valid response choices
If you wish, you can now load IntroRPx_LEDsForcedChoice.m to continue the tutorial with all code written so far, with new placeholder comments. You can also find the completed MATLAB script in IntroRPx_Complete.m.
Cite this guide
Kenny, S. (2020, May 21). Record response times with a RESPONSEPixx button box. Retrieved [Month, Day, Year], from https://vpixx.com/vocal/rt_responsepixx