-
Notifications
You must be signed in to change notification settings - Fork 1
/
EyelinkTest.m
39 lines (32 loc) · 1.08 KB
/
EyelinkTest.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% PTB Eyelink test:
WINDOW_RESOLUTION = [10 10 800 600];
PsychDefaultSetup(1);
Screen('Preference', 'SkipSyncTests', 1);
% Get the different screens:
screens = Screen('Screens');
% Use the last screen preferentially:
screenNumber = max(screens);
[w, wRect] = Screen('OpenWindow',screenNumber);
% Open Eyelink and run the calibration:
% Initializing eyelink
% Initializes Eyelink and Ethernet system. Opens tracker connection, reports any problems.
%window (above) is the window you set with the function Screen(\91OpenWindow\92)
el = EyelinkInitDefaults(w);
EyelinkInit(0, 1)
Eyelink('Openfile', 'test.edf');
% Setting the eyetracker to binocular
% Eyelink('command','binocular_enabled = NO')
% Setting calibration to 13 dots
% Eyelink('command','calibration_type = HV13')
EyelinkDoTrackerSetup(el);
% Starting the recording
Eyelink('StartRecording');
% Wait for the recording to have started:
WaitSecs(1);
% Stop the recording:
Eyelink('StopRecording');
%Closing the edf file
Eyelink('CloseFile')
status=Eyelink('ReceiveFile','test.edf', 'test.edf');
% Shutting down the Eyelink
Eyelink('Shutdown')