Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Use a push button to answer

Hello, I am very new to OpenSesame and I am trying to use the BrainProducts response button that is connected to a virtual serial port through BNC (BrainProducts TriggerBox) and then to the stimulation PC. I also record the EEG in the setup.

I use an auditory Oddball task and the participant just needs to push the button when he hears the target sound. My task is working great with the keyboard response, but I would like to use the push button to record the answers of the participants (and in the meantime log the response time and the accuracy if possible).

Can I have any help on how to code this in an inline_script or if there is another way to do it ?

Thank you very much for help !



  • Hi Eva,

    The first step would be to figure out how the TriggerBox sends signals to the stimulation PC. Is it also connected through a serial-to-usb converter? (I suspect so.) If so, then the next step would be to figure out what kind of message the TriggerBox sends when a button is pressed. A serial port uses characters/ bytes, and there's a good chance that every time that you press the button, a particular byte is sent. (So a very simple protocol. But more complicated protocols are also possible.)

    The best people to ask how this works would be the BrainPoducts folks themselves. They'll probably be able to provide you with a simple Python script that you can easily include in OpenSesame.

    The library to use the serial port in Python is pyserial :



Sign In or Register to comment.