Code for Serial Event Marker via serial port

445 views
Skip to first unread message

jarrod hollis

unread,
Jan 27, 2014, 9:16:54 AM1/27/14
to psychop...@googlegroups.com
I am using Emotive EPOC  EEG with their testbench software  which  collects event codes sent via a COM port.  (see screenshot for  settings)

Can I send a numeric code for a visual stimulus  from Psychopy  to  the serial COM  port?    What code would I need  for this?

I am new to programming   so any help would be greatly appreciated.




screen2.jpg

Jonas Lindeløv

unread,
Jan 27, 2014, 3:04:43 PM1/27/14
to psychop...@googlegroups.com
Should be possible, see http://www.psychopy.org/api/serial.html
Read the full documentation on serial.Serial() here: http://pyserial.sourceforge.net/pyserial_api.html

As you can see, you can specify all the parameters in the dialogue in your screenshot. Hope this helps!

Best,
Jonas


The full documentation is not there

Michael MacAskill

unread,
Jan 27, 2014, 5:21:07 PM1/27/14
to psychop...@googlegroups.com

jarrod hollis

unread,
Jan 29, 2014, 5:48:39 AM1/29/14
to psychop...@googlegroups.com
Thanks for the links...I have tried them  but I am still struggling a bit.  I have tried  to load  the pyserial   from the link below  but this will not load on my PC  (I am using win7 64bit)    I get an error saying I dont have Python on my system.

In Psychopy  I have placed the code into a simple script at the point where the stimulus is presented.....Is this the correct thing to do?? My output is on COM7 virtual COM port, my baud rate is 9600  have I missed anything I need??
screen100.jpg

Jonathan Peirce

unread,
Jan 29, 2014, 7:22:06 AM1/29/14
to psychop...@googlegroups.com
pyserial is included in the standalone distribution of psychopy - no need to install it separately.

Also, in version 1.79.01 you'll find a component for parallel port outputs in the builder (using pyserial behind the scenes).

Jon
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/bdb642e4-f86c-4797-8b24-fe7a9c8dd978%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
Jonathan Peirce
Nottingham Visual Neuroscience

http://www.peirce.org.uk/

jarrod hollis

unread,
Jan 29, 2014, 7:33:02 AM1/29/14
to psychop...@googlegroups.com
Thanks Jon.....I will  try and work it out...

.I will try and come on you Pyschopy  workshop  as  the software is impressive...I just need to get to grips with the code...



Reply all
Reply to author
Forward
0 new messages