OS (e.g. Win10): Win11
PsychoPy version (e.g. 2024.2.4 Py 3.8): 2026.1.0.
Standard Standalone Installation? (y/n) : y
Do you want it to also run online? (y/n) n
What are you trying to achieve?:
I collect keypresses from an optoelectronic device used in an MEG scanner. Experiments in the lab are usually run with the help of the PsychoPhysics Toolbox. However, my experiment was programmed in PsychoPy and I do not want to redo it in the PsychoPhysics Toolbox.
The optoelectric keyboard is connected to the host PC via the serial port. This is where the problems begin. The experiment does not run, no matter how I try to retrieve data from the serial device. Most of the time, the program crashes because it cannot find the port, does not have permission to read from it (which is strange), or the serialPort.readline() command is not recognised.
What did you try to make it work?:
I followed the instructions as described Reading from serial port(receiving triggers from MRI device) - #2 by Becca or Communicating with fMRI — PsychoPy®.
Does anyone have a working example that I could use, or could someone give me some advice on how to set up and read from the serial port?
Best wishes Jens