Wheel and brakes
 
 
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Wheel and brakes Expand / Collapse
Author
Message
Posted 11/16/2007 12:44:33 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 12/7/2007 10:54:01 AM
Posts: 3, Visits: 20
Hi,

It is said that E-prime 2 handle joysticks : -will it be possible with a USB joystick and furthermore,

could E-prime 2 understand output coming from a Logitech Wingman or MOMO Formula wheel and brakes?

If there is a script or a extern program that could help do that, I would be really please to know.

Thanks you for your precious help,

Maxime Lussier BC. S.

Post #880
Posted 11/20/2007 4:20:05 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Moderators
Last Login: 2/1/2008 8:32:03 AM
Posts: 13, Visits: 28
Hello,

Although we do not endorse any specific joystick vendor the following joysticks have been confirmed to work with E-Prime 2:
- Wingman Attack 2 from Logitech
- Various makes/models of the Microsoft Sidewinder series

It is our belief that any USB joystick device that Windows recognizes as a game controller would be accessible in E-Prime 2.

The following is a code sample taken from an InLine object that can be used to continually poll a Joystick:

Dim stickResponse As JoystickResponseData
Do
Set stickResponse = _ CJoystickResponseData(Joystick.History(Joystick.History.Count))

If (Not stickResponse Is Nothing) Then

' Use button 4 as a terminating sentinel
If (stickResponse.IsButton4) Then
Exit Do
End If

Dim displayOffsetX as integer
Dim displayOffsetY as integer

displayOffsetX = stickResponse.CursorX
displayOffsetY = stickResponse.CursorY

End If

Loop Until (False)

' Clean up
Set stickResponse = Nothing


Psychology Software Tools will be posting more robust sample experiments for download in the coming weeks to come so please stay posted.

Thank you,


-------------------------------------------
Christopher Neff
Software Engineer
Psychology Software Tools, Inc.
Post #917
Posted 12/7/2007 10:59:05 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 12/7/2007 10:54:01 AM
Posts: 3, Visits: 20
Hi,

With the help of E-prime 2 pro, the signal of the wheel and brake is now readable. But since those two can't possibly be enter in "correct" and "allowable" friendly user system, I managed to make a loop with an slide of 5 ms which look each time at the position of the joystick on the y axis (the brakes), stop if one of the brake is press and look if it is the good one.

' Look if one of the brakes is deeply press, if not, go back to the slide

If joystick.CursorY > 10 AND joystick.CursorY < 470 Then
  Goto loopflag
End If

'Look which brake as been press

If  stimulus.CRESP = 10 and joystick.CursorY <= stimulus.CRESP then
  stimulus.ACC = 1
  c.SetAttrib "feedback", "Good"
 Elseif stimulus.CRESP = 470 and joystick.CursorY >= stimulus.CRESP then
  stimulus.ACC = 1
  c.SetAttrib "feedback", "Good"
 Else
 stimulus.ACC = 0
 c.SetAttrib "feedback", "Wrong"
End If

    c.SetAttrib "Response1XPosition", joystick.CursorX
    c.SetAttrib "Response1YPosition", joystick.CursorY

So i have two question:

1) Am i right to think that "stimulus.offsetTime" can be consider as the last time the slide ended?

2) I want to insert a Inline before the slide appear for the first time to know the ms passed since the experiment started (to subtract it from the offset time and know how muck time the stimulus has been on screen). I haven't found the command to know that info. What is it?

Thanks

P.s. If you think of any way to make it easier or more accurate, feel free to tell me!

Maxime Lussier BC. S.

UQAM

Post #1014
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 5:16am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 12 queries. Compression Disabled.