sccn / lsl_archived

Multi-modal time-synched data transmission over local network
242 stars 133 forks source link

LSL app for APDM Opal Accelerometers to receive data from its software motion studio #91

Open benjaminjmaas opened 8 years ago

benjaminjmaas commented 8 years ago

Hi there,

I am trying to make a LSL app to make a new inlet for APDM Opal Accelerometers that receives info from its software motion studio into labstreaminglayer.

For this line of code

result = lsl_resolve_byprop(lib,'type','EEG'); end

What are the arguments that I can put instead of 'type' and 'EEG'? I am fairly new to "coding" so any help would be much appreciated. I am guessing that is the line of code I need to alter in order to receive the motion studio data.

Thanks for the help.

cboulay commented 8 years ago

Hi Benjamin,

For you to create an inlet of X, there first must be a outlet of X created elsewhere. Typically this means you would have to create and run a program that reads data from the hardware/server and sends the data to a stream outlet. This is already done for several different devices, like Enobio. I don't see any such program for APDM Opal motion studio. Do you have access to something like that?

Once the stream exists, then finding it (a.k.a. "resolving" it) is done by specifying the 'name' or the 'type' of the stream. For Enobio, the stream is specified with the name "Enobio" and the type "EEG" so you can resolve it using one of those parameters.

If you need to make your own program to stream to an LSL outlet, then your best bet will be to follow some examples that come with the APDM Opal Motion Studio SDK (Software Development Kit) and combine those with LSL examples. This will take a little bit of coding and the level of difficulty will depend partially on what language bindings are provided by the APDM SDK. LSL provides APIs for (in order of increasing difficulty, in my opinion): Matlab, Python, Java, C#, C, C++.