using joystick input for version 1.1

Matt Lenhart mplenhart at gmail.com
Mon Sep 22 18:49:21 UTC 2008


Hi Mary,

Since all joystick responses must be collected via InLine script in E-
Prime 2.0, you can log whatever data you need manually. So, for
example, say you want to present a word, and then have the subject
move the joystick and press the 1 button to submit their response. You
would create a TextDisplay object with a 0 Duration (no input masks),
and then place an InLine object immediately after. Inside the InLine
you would use script similar to the following:

Dim ptCursor As Point

Do
Loop Until Joystick.Buttons And ebJoystickButton1

c.SetAttrib "JoystickRTTime", Clock.Read
c.Setattrib "JoystickRT", Clock.Read - TextDisplay1.OnsetTime

Joystick.GetCursorPos ptCursor.x, ptCursor.y

c.SetAttrib "JoystickX", ptCursor.x
c.SetAttrib "JoystickY", ptCursor.y

This script assumes that the TextDisplay object is named TextDisplay1.
This script will loop continuously until a response is detected. It
will then log the Clock.Read value (i.e., current time) and calculate
the RT based on the current time and the onset time of the
TextDisplay1 object. It will then get the cursor position and log the
X and Y values.

You can log additional information if necessary using the c.SetAttrib
command. I would recommend looking at the Mouse device topic in the E-
Basic Help (accessed via the Help menu in E-Studio) for a good idea of
the properties that can be logged from the Joystick device (they are
virtually identical).

Please let me know if you have any further questions.

- Matt

On Sep 19, 4:45 pm, mary <maryesm... at gmail.com> wrote:
> Thanks so much!  We got the Eprime 2.0 Standard version, so what are
> the steps for using the joystick as input in the inline script?  I
> already added the joystick as an input device for the Experiment
> Object as you suggested.
>
> Also, what kind of information should I expect to receive from a
> joystick?  Would it be possible to just get input when the person
> presses a button after they adjust the joystick to a particular angle?
>
> Thanks,
> Mary
>
> On Sep 4, 12:42 pm, Matt Lenhart <mplenh... at gmail.com> wrote:
>
> > Mary,
>
> > Depending on which version of E-Prime 2.0 you ordered (i.e., Standard
> > or Professional), the Joystick will operate a bit differently. In both
> > versions, you will add the Joystick device via the Experiment object's
> > Property Pages. That is, you will double-click the Experiment object
> > at the top of the Structure window, navigate to the Devices tab, click
> > Add, and add the Joystick.
>
> > In E-Prime 2.0 Professional, you can then add the Joystick as an input
> > mask in the same manner as any other response device. In E-Prime 2.0,
> > response collection must be handled in InLine script (which we can
> > assist you with if necessary).
>
> > - Matt
> > PST Technical Consultanthttp://www.pstnet.com/
>
> > On Sep 4, 12:17 pm, mary <maryesm... at gmail.com> wrote:
>
> > > Thanks so much for your help--we're ordering Eprime 2.0 so for future
> > > reference, how would you make the joystick as input for eprime?
>
> > > Thanks,
> > > Mary
>
> > > On Sep 3, 3:58 pm, Matt Lenhart <mplenh... at gmail.com> wrote:
>
> > > > Hi Mary,
>
> > > > E-Prime v1.x is capable of recording responses from a joystick, but
> > > > only the buttons will be recognized as input. The current version is
> > > > not capable of reading the joystick position along an x/y axis. This
> > > > only applies to joysticks that connect through the parallel or game
> > > > ports.
>
> > > > Joystick support for buttons, sliders, POV controls, and x-y-z
> > > > position, is available in E-Prime 2.0. Please seehttp://pstnet.com/products/e-prime/faq/efaq2.htmformoreinformation
> > > > on upgrading.
>
> > > > Please let me know if you have any further questions.
>
> > > > - Matt
> > > > PST Technical Consultanthttp://www.pstnet.com/
>
> > > > On Sep 3, 1:54 pm, David McFarlane <mcfar... at msu.edu> wrote:
>
> > > > > Mary,
>
> > > > > > We're doing an experiment that we need joystick input to get resulting
> > > > > > angles in degrees as our output--is this possible in Eprime version
> > > > > > 1.1?  Would a joystick be able to give that kind of output?
>
> > > > > I have never used a joystick in EP, so I hope someone else will weigh in
> > > > >   here.  But if the joystick gives you xy coordinates, and if you have
> > > > > the xy coordinate of the joystick center, then you should be able to get
> > > > > angles in degrees just with a bit of trigonometry in an inline script.
>
> > > > > -- David McFarlane, Professional Faultfinder
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list