0

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!

2
  • Using the Python logging module, look at FileHandler in stackoverflow.com/questions/51125808/… Commented Dec 20, 2019 at 6:02
  • @PsychoStudentOL how are you logging the info you say you're logging correctly atm. Please show that code. Commented Dec 20, 2019 at 13:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.