Previous Thread  Next Thread

chat icon Blender and MRI?

lightstream22

Posted: Mon Aug 15, 2011 4:51 pm
Joined: 15 Aug 2011
Posts: 7
Hello Everyone,

I have a unique question involving Blender and its use when hooked up to a button box linked to an MRI machine. The button box transmits numbers (i.e. "1", "2", "3", etc.) based on the button that is pushed by a participant inside an MRI machine. The button box is connected to a windows 7 laptop computer running Blender 2.58.1 via a usb input plugged into the laptop.

In the Blender environment, I am running the game engine using GLSL, and the task is moving a "player" (i.e. cube) around an environment with keyboard logic bricks (e.g. 1 moves forward, 2 moves backward, etc), in addition to using python scripts, for logging keyboard inputs for example.

The problem is though, when I plug in the usb input from the button box, and a number is pushed on the button box, Blender sometimes registers the input, and sometimes does not register the input.

Also, note that working with the MRI is complicated by the fact that the MRI sends a "pulse" through the button box, corresponding to the number "5" every 2 seconds. However, when I log the button presses (using a python script), I get the number "5" input not at a constant 2 second interval, but rather at: 2 seconds, then 4 seconds, then 2 seconds, then 4 seconds, etc. It seems like blender is "skipping" or missing these in-between inputs.

I'd really appreciate anyone's help or input on this! Thanks a bunch!
Reply with quote


stiv

Posted: Mon Aug 15, 2011 6:53 pm
Joined: 05 Aug 2003
Posts: 3485
How exactly is Blender connected to the 'usb input'?
Reply with quote


lightstream22

Posted: Wed Aug 17, 2011 7:40 pm
Joined: 15 Aug 2011
Posts: 7
It's plugged in through a usb port on the side of the laptop. I didn't mean for that to sound confusing; its just a simple usb connection..
Reply with quote


stiv

Posted: Thu Aug 18, 2011 1:06 am
Joined: 05 Aug 2003
Posts: 3485
Quote:
its just a simple usb connection.


Sorry, that part I understood. I was wondering more about what sort of device the button box appeared as or asked another way, what protocol does is speak?
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group