Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Arduino and OpenSesame

guipruguipru Posts: 19
edited May 2016 in OpenSesame

Hello,
I am beginner, in english too. And I breaked my spacebar because I am disapointed!
I have an arduino with a force sensor. I would like use this sensor like a response in a experimental designed by Opensesame.
I use "new boks" and I import in script an import serial. But I am not succeed to realize test (and after 1 million tries I breaked my spacebar!) :

Error message:

Traceback (most recent call last):
  File "C:\Program Files (x86)\OpenSesame\plugins\boks\boks.py", line 249, in stop_test
    self.test_thread.active = False
  File "dist\libopensesame\item.py", line 280, in __getattr__
AttributeError: test_thread not found

Could you help me?
Thanks,
GT

Comments

  • sebastiaansebastiaan Posts: 2,737
    edited 2:26PM

    Hi,

    The Boks was a button box built around an Arduino and a custom 'sketch' (i.e. the software running on the Arduino). The Boks plugins are not general purpose: They do not just work with any Arduino, only those running the right software and built with the right connections. In addition, the Boks project has been discontinued (unfortunately).

    The Arduino is not very difficult to work with, but you'll need to start from the bottom and learn how everything works—no shortcuts here. The Boks software won't help you, except maybe that you can look at the way it's programmed, and adapt that for your purpose. There are quite a few good tutorials on the Arduino website. Your goal, I think, is to write an Arduino sketch that does the following:

    1. Read the force sensor
    2. Transmit this information via the serial port

    But how this works exactly depends on how you've put the hardware together. So you'll need to get your hands dirty and start coding!

    Cheers,
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • guipruguipru Posts: 19
    edited 2:26PM

    Hi Sebastiaan,
    Thank for your response.
    The important point is to be sure to advance in good way! If I'm certain that's possible to "capt" response from arduino project with force sensor (who commands a vibration, is not so easy) with opensesame it's ok for me.
    And it's a great new. I put my hands in coding now!
    If others have links I take!
    GT

  • guipruguipru Posts: 19
    edited 2:26PM

    Another question :could I insert a "new inline script" to dialog with arduino?

  • sebastiaansebastiaan Posts: 2,737
    edited 2:26PM

    Another question :could I insert a "new inline script" to dialog with arduino?

    Yes. For the Arduino, you would write a sketch using the Serial object to send information through the serial port (i.e. the USB port). In OpenSesame, you would then write an inline_script, using the serial module to capture this information.

    Again, this is only the general idea; the details depend very much on your set up.

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • guipruguipru Posts: 19
    edited 2:26PM

    It is exactly the procedure that I try now. Thanks a lot Sebastiaan. I'll try to explain my way if I success in the forum.
    See you
    GT

  • NoaNoa Posts: 32

    Hi @sebastiaan

    Is it possible to purchase the BOKS anywhere?

  • sebastiaansebastiaan Posts: 2,737

    Is it possible to purchase the BOKS anywhere?

    I'm afraid not! That project has been canceled.

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

Sign In or Register to comment.