Changes

Jump to navigation Jump to search
699 bytes removed ,  11:01, 16 November 2022
Line 200: Line 200:  
% reset marker
 
% reset marker
 
bb.sendTrigger(0)                % Note: if resetting the marker is not possible at this moment in code, you can decide to do this later as long as it has taken place long enough before the next marker has to be sent.
 
bb.sendTrigger(0)                % Note: if resetting the marker is not possible at this moment in code, you can decide to do this later as long as it has taken place long enough before the next marker has to be sent.
</syntaxhighlight>
  −
  −
BITSI extended mode:
  −
<syntaxhighlight lang="matlab" line style="overflow:auto;">
  −
samplerate = 500;
  −
pulseLen = 2000/samplerate;
  −
% select a function
  −
bb.sendTrigger(uint8('X'));  % select pulse time
  −
bb.sendTrigger(pulseLen);            % set time of duration pulse to (2000/samplerate) ms
  −
  −
val = 1;                                    % val: this is your marker code, range code 1-255
  −
bb.sendTrigger(uint8('M'));  % select marker out
  −
bb.sendTrigger(val);              % val: this is your marker code, range code 1-255
  −
</syntaxhighlight>
  −
  −
<syntaxhighlight lang="matlab" line style="overflow:auto;">
  −
% At the end of your script, close the buttonbox serial object
  −
    :
  −
bb.close();
   
</syntaxhighlight>
 
</syntaxhighlight>

Navigation menu