<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.uabgrid.uab.edu/w/index.php?action=history&amp;feed=atom&amp;title=Psychtoolbox</id>
	<title>Psychtoolbox - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://docs.uabgrid.uab.edu/w/index.php?action=history&amp;feed=atom&amp;title=Psychtoolbox"/>
	<link rel="alternate" type="text/html" href="https://docs.uabgrid.uab.edu/w/index.php?title=Psychtoolbox&amp;action=history"/>
	<updated>2026-06-10T16:34:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.2</generator>
	<entry>
		<id>https://docs.uabgrid.uab.edu/w/index.php?title=Psychtoolbox&amp;diff=4858&amp;oldid=prev</id>
		<title>Demet@uab.edu: Created page with &quot;==Learn to use psychtoolbox==  '''Official tutorial''' : [http://psychtoolbox.org/wikka.php?wakka=PsychtoolboxTutorial http://psychtoolbox.org/wikka.php?wakka=PsychtoolboxTuto...&quot;</title>
		<link rel="alternate" type="text/html" href="https://docs.uabgrid.uab.edu/w/index.php?title=Psychtoolbox&amp;diff=4858&amp;oldid=prev"/>
		<updated>2014-11-06T18:29:09Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Learn to use psychtoolbox==  &amp;#039;&amp;#039;&amp;#039;Official tutorial&amp;#039;&amp;#039;&amp;#039; : [http://psychtoolbox.org/wikka.php?wakka=PsychtoolboxTutorial http://psychtoolbox.org/wikka.php?wakka=PsychtoolboxTuto...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Learn to use psychtoolbox==&lt;br /&gt;
&lt;br /&gt;
'''Official tutorial''' : [http://psychtoolbox.org/wikka.php?wakka=PsychtoolboxTutorial http://psychtoolbox.org/wikka.php?wakka=PsychtoolboxTutorial]&lt;br /&gt;
&lt;br /&gt;
Playing with the screen example : [http://ureca.recherche.univ-lille3.fr/uploads/File/chauvin/html/psychToolbox.html http://ureca.recherche.univ-lille3.fr/uploads/File/chauvin/html/psychToolbox.html]&lt;br /&gt;
&lt;br /&gt;
== TTLRead.m ==&lt;br /&gt;
After the fMRI pulse signal is input to the fORP via fiber optic cable, it is converted to a TTL pulse and output via BNC.  Using USB1208FS, the TTL pulse is converted to readable numbers in PsychToolbox.  The below function reads these TTL pulses using PTB Daq functions.  Please read comments to make adjustments.&lt;br /&gt;
&lt;br /&gt;
 function TTLRead(n)&lt;br /&gt;
 % TTLRead(n)&lt;br /&gt;
 % TTLRead(number of TTL pulses to read)&lt;br /&gt;
 % This function reads TTL pulses from fMRI and sends them to PyscToolbox&lt;br /&gt;
 % using USB1208FS.&lt;br /&gt;
 if nargin == 0&lt;br /&gt;
     n = 1;&lt;br /&gt;
 end&lt;br /&gt;
 if ~exist('daqID','var') % tests whether device is open or not&lt;br /&gt;
     daqID = DaqDeviceIndex; % grab first device&lt;br /&gt;
 end&lt;br /&gt;
 i = 0;&lt;br /&gt;
 tic;&lt;br /&gt;
 oldDlines=DaqDIn(daqID);&lt;br /&gt;
 while i ~= n&lt;br /&gt;
     WaitSecs(0.050); % delay between each read (default = 0.050)&lt;br /&gt;
     Dlines = DaqDIn(daqID); % read the port&lt;br /&gt;
     if Dlines(1) ~= oldDlines(1); % determines if there is a change&lt;br /&gt;
         i = i + 1;&lt;br /&gt;
         oldDlines = Dlines;&lt;br /&gt;
     end&lt;br /&gt;
 end&lt;br /&gt;
 toc;&lt;br /&gt;
 disp '...stimulus now presenting...'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== RTBox('fake', 1) ==&lt;br /&gt;
It is possible to run functions/scripts which use RTBox to operate without actually having RTBox plugged into the MBP.  This code should be entered into the command window before running the function/script.  'clear all' to end the 'fake' setup.&lt;br /&gt;
&lt;br /&gt;
 RTBox(’fake’, 1)&lt;/div&gt;</summary>
		<author><name>Demet@uab.edu</name></author>
	</entry>
</feed>