plug-in OpenSesame Mac
3 posts
• Page 1 of 1
plug-in OpenSesame Mac
I am busy at the moment designing a template in Opensesame for a study in which we are going to use the VU-AMS. I found in the website that you have a plug-in for opensesame but that at this moment it is only for Windows. This is kind of a problem as I am currently using a Mac (and also the mac version of the VU AMS). Is there a way around this for Mac users?
- JarikdenHartog
-
- Posts: 35
- Joined: 06 Jan 2012, 12:41
Re: plug-in OpenSesame Mac
Hi luz0788,
Thank you for your question :-)
The OpenSesame VU-AMS plug-in referred to here is indeed Windows only.
You could use the following workaround I tested on a Mid 2010 Macbook Pro running a freshly installed OS X El Capitan (10.11).
After installing opensesame_3.0.7-osx-1.dmg. You can download this example file that sends a beeping marker to the VU-AMS device.
Note you probably want to use non beeping markers in your experiment, but it is wise to start with a beeping marker so you know the marker is received by the VU-AMS without taking out the CF card.
The beeping marker in the example will mark the offset (and thus the keypress) of the HitAnyKey sketchpad.
If you would like to mark the onset of a sketchpad put the Send Marker inline script in before the sketchpad.
Here are some other strings to send for non beeping markers:
Marker 1:
Marker 2:
Marker 3:
Notes:
Thank you for your question :-)
The OpenSesame VU-AMS plug-in referred to here is indeed Windows only.
You could use the following workaround I tested on a Mid 2010 Macbook Pro running a freshly installed OS X El Capitan (10.11).
After installing opensesame_3.0.7-osx-1.dmg. You can download this example file that sends a beeping marker to the VU-AMS device.
Note you probably want to use non beeping markers in your experiment, but it is wise to start with a beeping marker so you know the marker is received by the VU-AMS without taking out the CF card.
The beeping marker in the example will mark the offset (and thus the keypress) of the HitAnyKey sketchpad.
If you would like to mark the onset of a sketchpad put the Send Marker inline script in before the sketchpad.
Here are some other strings to send for non beeping markers:
Marker 1:
- Code: Select all
ser.write('\x38\x00\x0E\x00\x03\x00\x30\x00\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x01\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4E\x21\x9A\x5D ')
Marker 2:
- Code: Select all
ser.write('\x38\x00\x0E\x00\x03\x00\x30\x00\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x02\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0F\x52\x65\xF0 ')
Marker 3:
- Code: Select all
ser.write('\x38\x00\x0E\x00\x03\x00\x30\x00\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x03\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x83\xCF\x94 ')
Notes:
- Leave the “self.sleep(500)” in the closeAMS item to make sure the last marker is send before the connection is closed.
- Please take care to close the VU-DAMS configuration screen before starting your experiment!
- You can make VU-AMS recordings without putting on electrode stickers or even without connecting the ECG/ICG electrode cable. You will only record noise but will be able to open the 5FS file in VU-DAMS to check if all event markers are stored. You could even disable the triple beeps you get because of the out of range physiological signals via the Warning button in the configuration window. But don't forget to turn them back on!
- If this example opens as a text in your browser then please right click and choose Save target as... and choose filename VU-AMSonOSX.osexp
- JarikdenHartog
-
- Posts: 35
- Joined: 06 Jan 2012, 12:41
Re: plug-in OpenSesame Mac
Hi,
In addition I want to add that the workaround above does not use the OpenSesame VU-AMS plug-in (as it is Windows only) so it doesn't have to be installed.
The workaround uses pyserial which is packaged with OpenSesame for OSX by default so nothing extra has to be installed.
The inline script items in OpenSesame are used to:
initialise the serial connection:
send a string which will be received by the VU-AMS device as a marker (the Code below sends Beeping Marker 4)
close the serial connection
See the code above in action in this example also mentioned in the previous post.
In addition I want to add that the workaround above does not use the OpenSesame VU-AMS plug-in (as it is Windows only) so it doesn't have to be installed.
The workaround uses pyserial which is packaged with OpenSesame for OSX by default so nothing extra has to be installed.
The inline script items in OpenSesame are used to:
initialise the serial connection:
- Code: Select all
import serial
ser = serial.Serial('/dev/tty.usbserial-12345678') # open serial port
ser.baudrate = 38400 # set baudrate
send a string which will be received by the VU-AMS device as a marker (the Code below sends Beeping Marker 4)
- Code: Select all
ser.write('\x38\x00\x0E\x00\x03\x00\x30\x00\xFF\xFF\xFF\xFF\x01\x00\x00\x00\x04\x00\x00\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8B\x20\xAE\xDF') # write a beeping marker
close the serial connection
- Code: Select all
self.sleep(500) # sleep half a second to be sure last marker is send
ser.close() # close port
See the code above in action in this example also mentioned in the previous post.
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests
