ButtonBox: Difference between revisions

Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(9 intermediate revisions by 4 users not shown)
Line 4: Line 4:
| caption        = 2018 Buttonbox
| caption        = 2018 Buttonbox
| downloads      = {{bulleted list
| downloads      = {{bulleted list
       | [https://surfdrive.surf.nl/files/index.php/s/PPTKCyrjLkN4XUO Buttonbox 2018]
       | {{Surfdrive|https://surfdrive.surf.nl/s/KZzgpmC5oK5JBNr|Buttonbox 2018}}
       | [https://pypi.python.org/pypi/RuSocSci RuSocSci] (Python package)
       | [https://pypi.python.org/pypi/RuSocSci RuSocSci] (Python package)
   }}
   }}
Line 13: Line 13:
| caption        = 2013 Buttonbox
| caption        = 2013 Buttonbox
| downloads      = {{bulleted list
| downloads      = {{bulleted list
       | [https://surfdrive.surf.nl/files/index.php/s/72XEcu2XKSgzxjp Buttonbox 2015]
       | {{Surfdrive|https://surfdrive.surf.nl/s/KZzgpmC5oK5JBNr|Buttonbox 2015}}
       | [https://pypi.python.org/pypi/RuSocSci RuSocSci] (Python package)
       | [https://pypi.python.org/pypi/RuSocSci RuSocSci] (Python package)
   }}
   }}
Line 22: Line 22:
The output connector has two binary eight bit ports: input and output. The two ports can be used for responses (input) and stimulus triggers (output). Two 12 bits analog outputs and three 12 bits analog inputs. The output connector has a sound and voicekey which triggers when a amplitude reaches a threshold. By using the serial port, the BITSI can be used platform independently: it works on Windows, Linux and Mac OSX. Most programming environments and stimulus packages support serial communication.
The output connector has two binary eight bit ports: input and output. The two ports can be used for responses (input) and stimulus triggers (output). Two 12 bits analog outputs and three 12 bits analog inputs. The output connector has a sound and voicekey which triggers when a amplitude reaches a threshold. By using the serial port, the BITSI can be used platform independently: it works on Windows, Linux and Mac OSX. Most programming environments and stimulus packages support serial communication.


There is currently a [[Microsoft Windows driver issue]].
⚠️ There is currently a [[ButtonBox/Microsoft Windows driver issue|Windows driver issue]].


== BITSI Protocol ==
== BITSI Protocol ==
Line 272: Line 272:


# select a function
# select a function
bb.sendMarker(val=(ord(X)))   #select pulse time
bb.sendMarker(val=(ord('X'))) #select pulse time
bb.sendMarker(val=2)          #set time of dureation pulse to 2ms
bb.sendMarker(val=2)          #set time of dureation pulse to 2ms


bb.sendMarker(val=(ord(M)))   #select marker out
bb.sendMarker(val=(ord('M'))) #select marker out
bb.sendMarker(val=115)           #set marker value 115
bb.sendMarker(val=115)         #set marker value 115
</syntaxhighlight>
</syntaxhighlight>


Line 341: Line 341:
<br>
<br>
<br>
<br>
=== Matlab ===
=== Matlab ===
'''Example using markers with the Buttonbox in Matlab:'''
'''Example using markers with the Buttonbox in Matlab:'''
Line 358: Line 359:
% at the start of your script, reset marker
% at the start of your script, reset marker
samplerate = 500;
samplerate = 500;
pulseLen = 2000/samplerate;
pulseLen = 2000/samplerate; % get pulse time length for a 2 samples delay
bb.sendTrigger(0);
bb.sendTrigger(0);
% send a marker
% send a marker
Line 371: Line 372:
<syntaxhighlight lang="matlab" line style="overflow:auto;">
<syntaxhighlight lang="matlab" line style="overflow:auto;">
samplerate = 500;
samplerate = 500;
pulseLen = 2000/samplerate;
pulseLen = 2000/samplerate; % get pulse time length for a 2 samples delay
% select a function
% select a function
bb.sendTrigger(uint8('X'));  % select pulse time
bb.sendTrigger(uint8('X'));  % select pulse time