0

I am thinking to measure ERP from Emotiv EPOC (EEG), but in analysis, data should be divided based on timing of onset and offset of stimulus. So, during recording, timing of event, such as onset or offset, needs to be marked. Emotiv PRO offers function to record event marker via serial port. However, I have little knowledge about serial port, and I couldn't marked event. Could you tell me basic usage for Emotiv PRO about event marker via serial port ?

Below is what I tried.

First, I tried from MATLAB (2018a),

s=serial("/dev/cu.Bluetooth-Incoming-Port");
fopen(s); 

then, from Emotiv PRO, I started "set up serial point markers" but response was

Resource Busy.

Second, I tried in different order and from Emotiv PRO, started "set up serial point markers", and then from MATLAB, ran same code, but response from MATLAB was

Cannot connect to the /dev/cu.Bluetooth-Incoming-Port port. Possible reasons are another application is connected to the port or the port does not exist.

Third, I tried new MATLAB (2020a),

s=serialport("/dev/cu.Bluetooth-Incoming-Port",9600)

and I started "set up serial point markers" from Emotiv PRO (error didn't appeared), and, again from MATLAB (2020a)

write(s,1,"uint8")

but, marker didn't appeared in Emotiv PRO.

I confirmed that Emotiv PRO appropriately record marker from key pressing, but I couldn't from serial port.

1 Answers1

0

Oy, this isn't easy. Assuming you have no actual serial port, you need some sort of virtual port. One option is to use a software to create it. then your matlab will send a message to its port and Emptiv will receive the message with another port, both virtual. You will need to make sure the format is set the same way for both sender and receiver, such as BAUD = 115200 bps, Data size = 8 bits etc. Alternatively you can use a null modem cable, to connect a USB wire and convince both sender and receiver that these are two sides of a serial cable. I used it successfully using two computers, one to send the signal and one to receive.

Yuval Harpaz
  • 1,416
  • 1
  • 12
  • 16