I am using the Psychopy Builder to create an emotion recognition paradigm for fMRI use.
I used a custom code to get a connection with the serial port:
import serial
port = serial.Serial("COM3", 9600, timeout=None, parity=serial.PARITY_NONE, bytesize=serial.EIGHTBITS, stopbits=serial.STOPBITS_ONE)
line = port.readline(2)
My question is now, how do I log those informations from the serial port into a log file. Everything else I created within the builder gets logged perfectly in one log file. Its just the serial port input which is missing.
I hope you can help me out!
FileHandlerin stackoverflow.com/questions/51125808/…