[visionegg] Re: parallel code update: works fine...but

  • From: Andrew Straw <andrew.straw@xxxxxxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Mon, 24 Feb 2003 11:41:57 +1030

Hi Christoph,

Christoph Lehmann wrote:

Thanks, Andrew
silly question, but: how can I run LPTTriggerInController as "main",
means standalone app?

I'm not sure I understand your question exactly. To running "python DaqLPT.py". DaqLPT.py is a Python script when run standalone in addition to being a VisionEgg module. Here's a bit of background on how this trick works -- because Python modules are valid code, they can be run as scripts. In most cases, however, modules merely define classes as so forth, so when run as a script, the interpreter starts, runs the script, and then quits, usually without doing much other than having a few classes defined. If you want a module to do something only when run directly as a script, put those standalone-specific instructions behind an if __name__ == "__main__" conditional. (See the python docs at http://www.python.org/doc/current/lib/module-main.html )


by the way: my load_picture app now seems to work fine: pictures change
at the time, the pin12 goes from 0 to 5V. After I read in your code,
that  only SPP is supported, I changed back from EPP to SPP.

I'm glad to hear it works! On the computers I've tested, I didn't have make any changes to the BIOS settings for SPP parallel port mode. I just updated the DaqLPT docs, though.


no there are "only" 3 things left to do

1) I will update the latest MESA drivers, as soon as I backuped my
system
2) change the code to include fixation cross between stimuli (is there a
demo, which I can use for orientation)

I'm not sure exactly what you want to do... Is your script continuously in a go loop? If so, you'll need to create an instance of a Target2D class or FixationSpot class (they're very similar) and control the "on" parameter. I don't think there are any demos that do exactly this, but it is straightforward.


...finally it would be good, to verify timing...inclusive, whether the
mouse-button reaction-times are measured correctly

I agree that calibrating this is a good idea. I'm just not sure how you could click the mouse button at a calibrated time so that you can measure latency and, more importantly, variability in the latency. But depending on the resolution you need for your timing information, it may be easy.


======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: