Howdy, Stranger!

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

Supported by

Gamepad issue

Hi,

I'm currently trying to use a Logitech Gamepad (USB) in order to collect reaction times for a simple lexical decision task.
I tried to use the joystick plugin implemented in opensesame. Unfortunately, it seems that the plugin crashes the software at the beginning of the experiment, without any specific error message (cf. 1finished.png), like if the experiment was performed normally. Here is some screenshots of my issue + what i'm trying to do.





Have you an alternative and simple way just to collect button press and reaction time using joystick/gamepad? Maybe a simple script.
In fact, I just want that the "Hello. Keypress, please..." disapear as soon as the button is pressed.
I know that there is many threads, but I don't program in python at all. Hence, the documentation available on the website ( http://osdoc.cogsci.nl/3.1/manual/response/joystick/ ) wasn't helpfull for me.
I'm sorry for this beginner issue.

I tried to use this script instead of the joystick module (entirely inspired from this topic: http://forum.cogsci.nl/index.php?p=/discussion/59/solved-gamepad-or-joystick-as-input-device/p1 ):

import pygame
from pygame.locals import *

pygame.init()
gamepad = pygame.joystick.Joystick(0)
gamepad.init()
joystick_count=pygame.joystick.get_count()

button = None

while button == None:
    for event in pygame.event.get():
        if event.type == JOYBUTTONDOWN:
            button = event.button

Unfortunately, opensesame stop directly after the first cycle, with no error message

Thank you,

Benjamin

Comments

  • Hi Benjamin,

    It looks like a hard crash occurs when you try to initialize the joystick, both when using the plugin and when doing this through a script. This kind of crash is usually the result from a problem in the underlying libraries, Pygame in this case. OpenSesame cannot distinguish between this kind of hard crash (which doesn't give a Python error because Python itself crashes) and no crash at all, which is why it looks like the experiment finished succesfully--even though it clearly didn't.

    There is, unfortunately, very little that you can do about this kind of crash. Your best bet is probably to try a version of OpenSesame (like 3.1.2) that comes with a different version of Python and Pygame, and hope that the crash goes away.

    Cheers!
    Sebastiaan

  • Installing the 3.1.2 version totally fixed this issue... Thank you very much, and sorry for the spam, I should have checked for update in the first place before asking for help :smile:
    Cool new interface by the way.

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games