I’m driven to give some more details here, after the excellent link given by Kartik
For this particular application it’s OpenViBE which handles all the necessary synchronization; events are sent through shared memory to the “acquisition server” by the P300 CoAdapt speller.
When I have to use external software (e.g. Unity or python scripts) I ended up using the LSL network protocol ( https://github.com/sccn/labstreaminglayer/ ) to ensure proper synchronization – along each event of interest the soft creates an LSL “stimulation” that is sent over the network and recorded by, once again, OpenViBE (or any other program that supports LSL).
Whether I’m using OpenBCI or the medical grade equipment that my research team owns, this gives recordings good enough for ERP analyses.
The update I was talking about concerns the OpenViBE versions needed to run the P300 speller: at the moment it’s a bit messy, I’m using the acquisition server from OpenViBE 1.0+ (which supports natively OpenBCI) with the P300 CoAdapt speller from older OpenViBE 0.18 (the CoAdapt does not work with the newest versions of OpenViBE, the authors are working on a new and improved version).