Howdy, Stranger!

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

Supported by

How do I get touchscreen to respond to a single tap instead of a double tap?

Hi! I'm experiencing a problem with experiment code which registers participant's response on touchscreen. There is a phase where there will be two or five objects on the screen and participant will tap one of those objects to make a response, but no matter how hard we tried, it requires a double-tap to make the program respond and register the tap; if participant only taps one time, the mouse icon will still be invisible and nothing will happen.

The computer I use is Thinkpad X1, Windows 10; the touchscreen I use is Planar, from Planar System, Inc. Below is my sample code. I would be grateful if anyone would love to help me!


Comments

  • HI Cathy,

    Your code is confusing in that it is syntactically incorrect (your triple elif statements, and the lack of proper indentation). Which version of Opensesame are you using? Do you use the droid version by any chance? The way you call Opensesame modules is very much outdated, so I am wondering whether this is for a reason, or whether I can suggest more up to date code, that might not be backward compatible.

    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    Thank you for your reply! The version I'm currently using is Opensesame 3.0. The reason why the code looks outdated is that we are trying to adapt the experiment paradigm used by one of my previous lab-mates about 5 years ago, and the original code he wrote was just around that time.

    I would very much appreciate it if you could suggest more up to date code! I think that is probably what we need in order to achieve the one-tap goal :)

  • Hi Cathy,

    Here an example experiment (i.e. the inline_script) that doesn't do much else than your example above. It is a bit tricky to write helpful code without having the context of the rest of the experiment. Also, as a disclaimer, I am not sure you can simply plug in a touch screen into your pc and use it as a mouse.

    The version I'm currently using is Opensesame 3.0

    I see. Well, if you need to adapt anyhow, perhaps it might make more sense to bring it all the way to the current version? At least I wrote the code now for 3.3.11. I am a bit hazy on what features were introduced at 3.0 and which only later, so my code might actually not work on your version. Again, with more context, I can try to adjust the code for older versions as well.

    Hope this helps,

    eduard

    Buy Me A Coffee

  • Hi Eduard,

    Thank you so much for your code! I really appreciate your help. Next Monday I’ll have access to the touchscreen again so I’ll set equipments up to test whether this will work out. I’ll definitely let you know how it goes! :)

    Enjoy your weekend!

    Best,

    Cathy

  • Hi Eduard,

    I had access to the touchscreen today and I got to try out your code. For some reason, it still requires a double-tap :( Do you think there's anything else I can do?

    Best,

    Cathy

  • Hi Cathy,

    Well, I am not surprised really, as I only optimized your code a bit, I didn't change any intrinsic logic. Whether or not, there is a bug in your experiment, or something wrong with Opensesame, I can't tell based on the screenshot you sent earlier. If you share your experiment here, I can have a look and see whether I can backtrace the issue.

    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    Thanks for your contribution! I think the fact that you provided us with up-to-date code really helps us with our present situation. I'm happy to let you know that, with your code, we are actually getting somewhere this time!

    Long story short, eventually, my lab-mate helped me out and got it working. He suspects there's something strange in the way Opensesame, PsychoPy and Windows are handling the touchscreen. We did end up getting it working (participants don't need to double tap anymore). We had to draw a cursor at the current mouse position in order to get it to update.

    In case someone else has this problem, we attached some sample code based on your previous example that shows our solution.

    Thanks again!

    Cathy


  • Hi Cathy,

    Great to hear that and thanks for sharing!!

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.