How to send mouse response triggers to parallel port?

41 views
Skip to first unread message

Casey P

unread,
Apr 22, 2015, 7:57:29 PM4/22/15
to e-p...@googlegroups.com
I am having some trouble writing the inline script for my experiment, particularly sending signals to Neuroscan for mouse responses. 

Brief overview of experiment: A fixation cross (named Fixation, Text Display in EStudio) then an image (named Target, ImageDisplay in EStudio) appear. While the image is displayed, the participant is required to press the left or right button on the mouse. This repeats 100 times with different images. I would like to send triggers for Fixation onset, Target onset, mouse response (with a different trigger for left and right) and Target offset.

At the moment, the Fixation and Target triggers are being sent through but the mouse response is not.

I'm complete novice with EBasic so any help getting the mouse triggers to work or tidying up my code would be much appreciated.

My script so far:

'Triggers throughout experiment
Fixation.OnsetSignalEnabled = True
Fixation.OnsetSignalPort = &H378
Fixation.OnsetSignalData = 1
Fixation.OffsetSignalEnabled = True
Fixation.OffsetSignalPort = &H378
Fixation.OffsetSignalData = 0

Target.OnsetSignalEnabled = True
Target.OnsetSignalPort = &H378
Target.OnsetSignalData = 2
Target.OffsetSignalEnabled = True
Target.OffsetSignalPort = &H378
Target.OffsetSignalData = 0

'Mouse clicks
If (Mouse.Buttons AND ebMouseButton1) Then
    WritePort &H378, 3
End If

If (Mouse.Buttons AND ebMouseButton2) Then
    WritePort &H378, 4
End If


Thanks,
Casey
Reply all
Reply to author
Forward
0 new messages