Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

uncommented the parallel port signal commands

had to comment out the parallel port signal commands to test and have
just uncommented them
  • Loading branch information...
commit 8af8413601447b107adc0a162f8a58719852f32a 1 parent 94c2ba7
authored December 26, 2012

Showing 1 changed file with 8 additions and 7 deletions. Show diff stats Hide diff stats

  1. 15  src/MegProsodyAutoFrame.py
15  src/MegProsodyAutoFrame.py
@@ -14,10 +14,10 @@
14 14
 from numpy import sin, cos, tan, log, log10, pi, average, sqrt, std, deg2rad, rad2deg, linspace, asarray
15 15
 from numpy.random import random, randint, normal, shuffle
16 16
 import os  # handy system and path functions
17  
-##from psychopy import parallel
  17
+from psychopy import parallel
18 18
 
19  
-##parallel.setPortAddress(0x378) #address for parallel port on many machines
20  
-##pinNumber = 2 #choose a pin to write
  19
+parallel.setPortAddress(0x378) #address for parallel port on many machines
  20
+pinNumber = 2 #choose a pin to write
21 21
 
22 22
 # Store info about the experiment session
23 23
 expName = 'None'  # from the Builder filename that created this script
@@ -193,7 +193,7 @@
193 193
         # start/stop megStim
194 194
         if frameN >= 0 and megStim.status == NOT_STARTED:
195 195
             #PARALLEL CLEAR
196  
-            ##parallel.setData(0) #sets all pins low
  196
+            parallel.setData(0) #sets all pins low
197 197
             
198 198
             # keep track of start time/frame for later
199 199
             megStim.tStart = t  # underestimates by a little under one frame
@@ -201,11 +201,12 @@
201 201
             megStim.play()  # start the sound (it finishes automatically)
202 202
 
203 203
             #PARALLEL SET
204  
-            ##parallel.setData(trigg_code) #sends trigg_code from conditions file
  204
+            parallel.setData(trigg_code) #sends trigg_code from conditions file
205 205
 
206 206
         #PARALLEL CHECK
207  
-        ##if frameN >= 0.0 + 0.05 * 60 and megStim.status == NOT_STARTED:
208  
-            ##parallel.setData(0)
  207
+        #for frames can only use whole number of frames
  208
+        if frameN >= 1 and megStim.status == NOT_STARTED:
  209
+            parallel.setData(0)
209 210
         
210 211
         #TIMEFIX: changes megStim.status to FINISHED after duration
211 212
         if frameN >= stimLength * 60 and megStim.status == STARTED:

0 notes on commit 8af8413

Please sign in to comment.
Something went wrong with that request. Please try again.