@@ -114,7 +114,12 @@ The third example shows a similar experiment using the function getAnswer, which
All examples use two computer monitors. If you want to run it on only one monitor, you have to delete the ‘(2)’ behind [initWindow](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Screen/initWindow.m). We recommend using two computer screens if possible. This allows to program in MATLAB or Octave on one screen and see the results on the second screen.
Depending on your device initWindow and [closeWindow](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/Screen/closeWindow.m) may need some time to run. This means in an actual experiment when exact timing matters call the window initialization before the actual start of the experiment.
## Function tree
The functions of this toolbox are organized hierarchically. Some functions need to be called before you can use others. The following list displays this dependency. The keywords on the right in the oval-shaped bubbles mark functions that belong together. They can be used to find the respective headers in this documentation. On the left, mostly in boxes, you can see the functions of this toolbox as a flow chart. When writing a script make sure to follow the arrows of the chart. When you open a branch by calling the initialization function for a group of functions (e.g. initVideo for video display) make sure to follow this path until the end and call a close function if needed (e.g. closeVideo). Close functions can be identified by an arrow pointing downwards. If a function group does not have a close function (e.g. Text options) then there is nothing specific to call when you want to exit this group. Every function mentioned will also be explained below in this documentation.
At the very beginning of every script you always have to call the initOTBR function to initialize the use of the OTBR Toolbox. At the end of scripts you always have to call stopExperiment. The myHardwareSetup and myParadigmSetup functions will be called internally. If you want to use visual stimuli (Text, Images, Videos) you always need to call initWindow before, to initialize a presentation window. After finishing visual output call closeWindow to shut down the presentation window again. If you want to use network communication that is more flexible than the options mentioned in Device Interface please read section 2.2. Coding device interfaces first.