@@ -18,24 +18,41 @@ We recommend copying both toolboxes only one time on your computer to avoid conf
## Setup an experiment
After downloading, unzipping and saving the toolboxes create one folder to store all the files for your experiment in, e.g. to the path ‘D:\ Experiments\Experiment1’. Your experimental folder should not be the same as your toolbox’s folder! As stated above you can code several experiments on the same device. Create a new folder for every new experiment you code, because setup files will have the same names in every experiment.
To start a new coding project or experiment make sure your working directory in MATLAB is the newly created folder for your project. Please don’t underestimate this first step, because you have to know where your files are
To start a new coding project or experiment make sure your working directory in MATLAB is the newly created folder for your project. Please don’t underestimate this first step, because you have to know where your files are :smile:.
In order to setup the OTBR Toolbox for an experiment you need to copy the files ‘[initOTBR.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/initOTBR.m)’, ‘myHardwareSetup.m’ and ‘myParadigmSetup.m’ from the toolbox’s folder into your experimental folder.
In order to setup the OTBR Toolbox for an experiment you need to copy the files [initOTBR.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/initOTBR.m), [myHardwareSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myHardwareSetup.m) and [myParadigmSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myParadigmSetup.m) from the toolbox’s folder into your experimental folder.
Open the ‘myHardwareSetup.m’ script you just copied in MATLAB and define the correct pathway to the OTBR Toolbox folder and the Psychophysics Toolbox folder in the script (sections 1a & 1b). In Windows you can see the correct pathway when you open your folder and click into the Windows-Explorer’s explorer bar, right above your files. Furthermore you have to define the platform of your experimental computer (Windows64Bit or RaspberryPi3, section 1c).
Open the file [myHardwareSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myHardwareSetup.m) you just copied in MATLAB and define the correct pathway to the OTBR Toolbox folder and the Psychophysics Toolbox folder in the script (sections 1a & 1b). In Windows you can see the correct pathway when you open your folder and click into the Windows-Explorer’s explorer bar, right above your files. Furthermore you have to define the platform of your experimental computer (Windows64Bit or RaspberryPi3, section 1c).
```matlab
%% (1a) Please enter path to the BiopsyToolbox folder
Define all other parameters (sections 2-11) in the myHardwareSetup script if necessary. You can find descriptions and possible arguments in the script that will help you. This will set up the general hardware for your experiment, including input and output devices and possibly a connected Raspberry system that can be controlled remotely via network. For the first start the standard setting are fine and you can now start with your first project.
Define all other parameters (sections 2-11) in [myHardwareSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myHardwareSetup.m) if necessary. You can find descriptions and possible arguments in the script that will help you. This will set up the general hardware for your experiment, including input and output devices and possibly a connected Raspberry system that can be controlled remotely via network. For the first start the standard setting are fine and you can now start with your first project.
Make sure to specify the correct pin numbers when using any external devices such as house light or feeder (read chapter 2.2. Coding device interfaces for further information). Default settings are good for testing purposes. In the following example the feeder uses pin number 4 and the feeder light uses pin number 5. Other output devices are not used, thus they contain an empty matrix.
For beginners and your first programs there is no need to modify the myParadigmSetup script, since it deals with hardware setups that you probably don’t have for your first steps.
For beginners and your first programs there is no need to modify the [myParadigmSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myParadigmSetup.m) script, since it deals with hardware setups that you probably don’t have for your first steps.
If you are more familiar with the toolbox and had your first success stories continue with setting up the myParadigmSetup script in defining the position of response keys. This feature is mostly used for setups with physical switches that are used in front of a monitor or for setups with a touch screen that expects a response on a defined position.
Edit sections 1-6 to choose certain setups for your software. These include switch/ image position with respect to the screen size (1), width and height of these switches/ images (2), background color for your presentation window (3), enabled/ disabled transparency of your stimuli (4), enable/ disable sound support (5) and choosing an image for negative feedback if needed (6).
This is an example of how to define the position of a response key on the monitor.
...
...
@@ -46,12 +63,12 @@ he advantage of having these two setup functions of the toolbox becomes apparent
As you can see the OTBR Toolbox is installed properly and informs the user about the location of the toolbox folders. The information displayed may vary depending on the hardware and the settings done in myHardwareSetup.m and mySoftwareSetup.m. This is important if you want to use different versions of the psychophysics toolbox. In addition, the psychophysics toolbox informs the user about the hardware installed in the computer and about possible adjustments that may be necessary. All psychophysics toolbox information start with “PTB-“.
As you can see the OTBR Toolbox is installed properly and informs the user about the location of the toolbox folders. The information displayed may vary depending on the hardware and the settings done in [myHardwareSetup.m](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/myHardwareSetup.m) and mySoftwareSetup.m. This is important if you want to use different versions of the psychophysics toolbox. In addition, the psychophysics toolbox informs the user about the hardware installed in the computer and about possible adjustments that may be necessary. All psychophysics toolbox information start with “PTB-“.
Next, create a new folder in your experimental pathway that contains all stimuli you want to use. Also create a folder that shall contain all results from your experiment.