Skip to content

Stream times are not synchronized #6

Description

@Matthew910818

Hi, I have tried to plot the channel data through EEGLAB, but however, the event markers are all at time = 0.
The data was EEG data from Muse2 Headband and the events were from python (pylsl) as a marker stream.
This is the python code :

import serial
from pylsl import StreamInfo, StreamOutlet, local_clock

serial_port = 'COM4'
baud_rate = 9600
ser = serial.Serial(serial_port, baud_rate)

info = StreamInfo('MyMarkerStream', 'Markers', 1, 0, 'string', 'myuid34234')
outlet = StreamOutlet(info)

while True:
    try:
        line = ser.readline().decode('utf-8').strip()
        timestamp = local_clock()
        print(type([line]))
        outlet.push_sample([line], timestamp)
        print(f"Sent data: {line} hz at time: {timestamp}")
    except KeyboardInterrupt:
        print("Exiting...")
        ser.close()
        break
    except Exception as e:
        print(f"An error occurred: {e}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions