Update Device Interface: bIOStrobe authored by Fabian Berg's avatar Fabian Berg
......@@ -63,6 +63,41 @@ A third argument can be used to send an [event-code](/How-tos#event-codes), for
**See also**
[myHardwareSetup](/Initialization#myhardwaresetup), [feeding](/Device-interface#feeding-animal), [punishment](/Device-interface#punishment-animal), [startExperiment](/Initialization#startexperiment)
## bIOStrobe
function: out = [bIOStrobe(pin, numStrobes, freq)](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/IO/bIOStrobe.m)
**Description**
Use this function to send a strobe signal (square signal with a duty cycle of 50%) via a selected output pin or multiple pins. During the presentation of the strobe signal the IO device itself is blocked due to the presentation of the strobe signal, but MATLAB is still able to execute other commands!
To estimate when the presentation of the square signal is finished, the time to the end of the presentation is returned in seconds.
**Inputs**
~~~
pin the output pin where the signal is presented
num the number of square signal cycles that are presented
freq the frequency of the signal in Hz
~~~
**Outputs**
~~~
out the estimated time when the signal is presented (MATLAB is not blocked,
but the IO device)
~~~
**Examples**
~~~matlab
1. bIOStrobe(2, 400, 120);
% Presents 400 cycles at 120 Hz on pin 2
2. bIOStrobe(1:4, 400, 120);
% Presents 400 cycles at 120 Hz on pins 1 to 4
~~~
**See also**
[initNetworkIO](/Device-interface#opennetworkio), [closeNetworkIO](/Device-interface#closenetworkio)
## feeding (animal)
function: result = [feeding(time,varargin)](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/IO/feeding.m)
......@@ -158,6 +193,9 @@ The screen is cleared, but can be kept by using an optional input argument (not
% punishment for 1.5 seconds and keeps the screen content
~~~
**See also**
[feeding](/Device-interface#feeding-animal), [bIO](/Device-interface#bio)
## openNetworkIO
function: [openNetworkIO](https://gitlab.ruhr-uni-bochum.de/ikn/OTBR/-/blob/master/IO/Interface7/openNetworkIO.m)
......
......