Welcome! Log In Create A New Profile

Advanced

reading eye data from serial port

Posted by jean_r 
reading eye data from serial port
April 07, 2021 10:21AM
Hello,
Serial port is supported in ML but I haven't seen any use case examples showing how to use it. My specific goal is to read eye position samples from an ASL eye tracker and input these in eye_, eye2_ tracker signals.
Any hints on how to do that would be most welcome.
Re: reading eye data from serial port
April 07, 2021 01:57PM
What matters is what the serial port is supported for. To be interfaced with NIMH ML, your eye tracker should support voltage output. And you need an NI board. You can use TCP/IP instead, if your eye tracker is either Arrington, EyeLink or ISCAN.
Re: reading eye data from serial port
April 07, 2021 02:47PM
Understood. I'll use an NI board, but that means I won't be able to recover pupil diameter.
Binocular ASL provides 4 analog outputs, allowing to read h and v for both eyes, but it leaves out pupil diameter. Its RS-232 output contains everything. With the PsychToolbox, I was able to read and decode serial data packets using the IOPort mexfile .
What then is serial input supported for in NIMH ML ?
Re: reading eye data from serial port
April 08, 2021 12:53AM
It is unfortunate that the ASL tracker does not support voltage output for pupil size. NIMH ML does not sample/save serial input automatically for you, but you can still read and decode it yourself.

MATLAB has built-in commands for serial port, so I don't think you will need PsychToobox but you can call the IOPort mexfile, too, if you want.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.