Hi Michael,
I am having trouble identifying the serial port name even after plugging in the USB to my mac. I think this might be because the device is a homemade fMRI trigger box, which is also the same signal for capturing key presses via some sort of converter box. My mac can identify the device, so I thought it was just an issue of installing the right driver, but it appears that the device was built with USB HID communication to the computer so no driver is needed.
Now, I tried using a generic serial port name “ttys000” into my code, and I get the following error message:
Running: /Users/Angela/Desktop/Moran2006PyschoPy/BandWagon_WordList1_9.12.16.py
2016-09-12 09:37:47.266 python[1774:507] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/1x/f4z859vj24d06j_c66rxhhq40000gp/T/org.psychopy.PsychoPy2.savedState
pyo version 0.8.0 (uses single precision)
Traceback (most recent call last):
File “/Users/Angela/Desktop/Moran2006PyschoPy/BandWagon_WordList1_9.12.16.py”, line 22, in
ser = serial.Serial(’/dev/ttys000’, 115200, timeout = .0001)
File “/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/serial/serialutil.py”, line 182, in init
self.open()
File “/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/serial/serialposix.py”, line 265, in open
self._update_dtr_state()
File “/Volumes/PsychoPy/PsychoPy2.app/Contents/Resources/lib/python2.7/serial/serialposix.py”, line 595, in _update_dtr_state
fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
IOError: [Errno 25] Inappropriate ioctl for device
Can you figure out what’s going wrong?
Thanks so much for your help,
Angela