This message has a bit of code: https://sourceforge.net/p/pebl/mailman/message/29208422/
You probably need Shane's help but even so you may need to do some detective work. When I look at the PEBL source code here: https://sourceforge.net/p/pebl/code-0/HEAD/tree/trunk/src/devices/PComPort.cpp It looks like on non-Linux platforms (currently line 113) it sets the port to portnum+1 So, you may need to use port 0 to get COM1 I don't see any way to set the parity. It looks like Shane would have to add support for this in PEBL: http://stackoverflow.com/questions/28965897/porting-c-serial-port-parity-change-code-from-linux-to-windows The Windows default is none: https://msdn.microsoft.com/en-us/library/system.io.ports.serialport.parity(v=vs.110).aspx?cs-save-lang=1&cs-lang=cpp#code-snippet-1 But I would try without setting parity and see if your EEG software will work without a parity bit. -Alan On 9/17/2016 5:24 PM, Anne Gilman wrote: > Could I ask to see some sample code for the COM port commands? > > I've searched the past few years help digests, and your guidance for > Dr. Rusciano (quoted below) is what I could find... I'd like to follow up. > > The EMOTIV+ EEG software we have can listen to COM1 or COM2, and can > take in one code... Thus far it only works (sending from another > program, SuperLab) when I set parity to odd. > > The OpenCOMPort() command has parameters for number (do I just say "1" > for COM1?) and baud rate, but not sfaict for parity or handshaking. > > I would really like to be able to present our stimuli using PEBL > instead, but clearly I could use some help with the serial port part. > > Thanks for any help you can offer, > > Anne G. > > ... > > For EEG, this really depends on how your system works, and what > you are > planning on doing.. You will typically want event markers > (start-of-trial, etc.) that are synched to your eeg log. I've used > parallel and serial ports (and the ftdi emulator) to do this sort > of thing > before, and it is pretty straightforward, but you would need to > implement > it yourself and add the signalling to the PEBL script. If you are > interested in only a spatial map, it might be good enough to > synchronize > the data sequences at the beginning so you know when the trials were > happening, and can do proper subtractive methods. > [...] > > End of Pebl-list Digest, Vol 91, Issue 1 > **************************************** > > > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Pebl-list mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pebl-list -- Alan D. Mead, Ph.D. President, Talent Algorithms Inc. science + technology = better workers +815.588.3846 (Office) +267.334.4143 (Mobile) http://www.alanmead.org I've... seen things you people wouldn't believe... functions on fire in a copy of Orion. I watched C-Sharp glitter in the dark near a programmable gate. All those moments will be lost in time, like Ruby... on... Rails... Time for Pi. --"The Register" user Alister, applying the famous "Blade Runner" speech to software development
------------------------------------------------------------------------------
_______________________________________________ Pebl-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pebl-list
