Hello, I am brand new to psychopy and found it while trying to get a way to communicate with my PhotoResearch PR655 meter for use in my python project. I installed all the dependencies to get the program to run, but I’m unsuccessfully trying to connect to my meter. The documentation I followed is here:
With very little serial communication experience, it is unclear to me what to use as ‘port’ so I have tried both ‘/dev/tty.usbmodem31’ and ‘/dev/cu.usbmodem31’. When I run my script:
from psychopy.hardware.pr import PR655 port = r'/dev/tty.usbmodem31' meter = PR655(port) meter.getDeviceSN()
I get the following error:
Traceback (most recent call last): File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1596, in <module> globals = debugger.run(setup['file'], None, None, is_module) File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 974, in run pydev_imports.execfile(file, globals, locals) # execute the script File "/Users/ccuellar/gdrive/softdev/proj/cal_tools/cal_tools/pr_connect.py", line 4, in <module> meter = PR655(port) File "/usr/local/lib/python2.7/site-packages/psychopy/hardware/pr.py", line 318, in __init__ self.com.setBaudrate(115200) AttributeError: 'Serial' object has no attribute 'setBaudrate'
I poked around the pr.py file and don’t see any methods for the PR655 class called setBaudrate, so I’m not sure how this is supposed to run. I will keep poking around and seeing if there is anything else, but I assume this is a problem on my end as I’m sure other people have made this meter work if the module exists for it. Any help would be greatly appreciated!