This page is for custom-made devices. For commercial TCP/IP eye tracker products, see this.
Custom eye trackers and joysticks can be interfaced with NIMH ML via Ethernet. Choose "UDP/TCP Joysticks" or "My EyeTracker" in the [Other device settings] menu.
Those who want to connect their networked eye tracker or joystick to NIMH ML should provide either a UDP client or a TCP server, which means that NIMH ML will serve as a UDP server or a TCP client. The frequency of data update is dependent on how often packets are sent to NIMH ML.
If UDP is used, the firewall of the NIMH ML computer should allow inbound traffic for the speficied port (or to the MATLAB).
For TCP communication, NIMH ML will send "ok" first when it is ready to receive a new packet. See the attached example code below.
Make a string of comma-separated values (CSV) with joystick X & Y coordinates and button states. Then send it to NIMH ML. The total length of a packet must be 512 bytes or less.
Format: "joyX, joyY, button1, button2, button3, ... , button32" (do not include quotation marks)
Example: "-500, 300" (XY only), "1000, -250, 0, 1" (XY & 2 buttons)
Code: UDP_example TCP_example
Send eye X & Y coordinates and extra eye measures in the CSV format. The total length of a packet must be 512 bytes or less.
Format: "eye1X, eye1Y, eye2X, eye2Y, extra1, extra2, extra3, ... , extra10" (do not include quotation marks)
Example: "-1.534, 2.378, 0, 0, 3.231" (eye1 XY & pupil size)
Code: UDP_example TCP_example