MBT SMARTING 24 User Manual page 68

Table of Contents

Advertisement

Rename the script to udpsetup by clicking on inline_script caption
in the right window (Figure 10.7);
 Copy the following text in the Prepare Section, Figure 10.7:
import socket
global port
global socket
port = 40007
# A predefined port that matches the SMARTING client
print 'Opening socket'
socket = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
print 'Server is started ...'
To send the triggers that notify about the experiment start trigger (e.g.
trigger type 3), write the following text in the Run section (Figure 10.8).
socket.sendto('3', ('localhost', port))
Figure 10.7 Start the UDP server in OpenSesame. Setting up the Prepare section
SMARTING User Manual – Release 11/03/2019
65

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents