Guide

Lab triggers (EEG, fNIRS, EDA)

Send TTL event markers to your recorder over USB while the study runs in the browser.

Mark events on a lab recorder from a browser experiment. The platform sends the codes and keeps the ledger; your recorder keeps the signal. Nothing physiological is stored here.

Markers are accurate to about one screen frame. That is fine for block-level, frequency-domain and state-based analysis. For ERP work epoched to stimulus onset, use a photodiode as you would with any presenter — our pulse and your photodiode both land in your recording, so you can correct the offset trial by trial.

What you need

Before you start

  • A USB trigger box (Teensy, Arduino Leonardo, Cedrus StimTracker, LabJack, BlackBox ToolKit). An opto-isolated box is strongly preferred.
  • Chrome or Edge on a desktop computer. Firefox, Safari and iOS cannot reach serial devices.
  • Marker output wired to a recording input only — never to a device that delivers energy to a participant.

How it works

  1. 1

    Turn on triggers in project settings

    Enable triggers, and set the baud rate and pulse width to match your box. Resume is switched off automatically — a resumed session replays trials, which would re-fire markers into your recording.

  2. 2

    Describe the markers in the AI editor

    Ask for the codes you want in plain language, for example “send trigger 1 at stimulus onset and 2 on response”. The builder puts them in CONFIG.triggers so you can edit them later.

    Every code must be different. Two conditions sharing a code cannot be told apart in the recording afterwards.

  3. 3

    Start your recording first

    Begin recording before consent, once for the whole flow. Session-relative marker times assume one continuous recording.

  4. 4

    Run the pre-flight check

    Open the study link. Choose the serial port, send the test markers (1, 2, 3), and confirm you can see them in your own recorder before the session begins.

Example ask: “This is an EEG oddball. Send trigger 1 for standards and 2 for deviants at stimulus onset, and 3 on the button press.”

What you get in the export

  • events.tsv — BIDS-shaped marker log (onset, duration, trial_type, value) with an events.json sidecar.
  • sessions.csv gains markers_sent , markers_echoed and echo_rate so you can see delivery at a glance.
  • Trial rows carry trigger_code and trigger_t , giving you a direct join into the marker log.
Auditory paradigms are not supported. Browser audio onset is tens of milliseconds late and varies between machines, and a photodiode cannot see sound.