test.pressed result not showing

PennController for IBEX Forums Support test.pressed result not showing

This topic contains 2 replies, has 2 voices, and was last updated by Avatar rbieber 4 days, 23 hours ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6364
    Avatar
    rbieber
    Participant

    Hi Jeremy,
    I’m having trouble using test.pressed to give subjects feedback on a key press Stroop task. Here’s what I have right now.

    Template("practice.csv", 
       row => newTrial ("practice", 
        
            newText("PracticeStim", row.StimWord)            
                .settings.css("font-size", "36")
                .bold()
                .color(row.StimColor)
                .print()
    ,
    
        newKey("key", "RBGO")
            .wait()
            .log()
        ,
        
        getKey("key")
           .test.pressed(row.CorrectResponse)
           .success( newText("success", "Correct!").print() )
           .failure( newText("failure", "Incorrect - press the key that matches the COLOR of the text, not the meaning of the word").print() )   
           
        )   
    
    )

    I’ve been reading some previous posts and tried things like putting the .test.pressed in callback, or adding in a timer to allow time for the results to print, but nothing seems to work. The script runs just fine, I just never see the result of the test.pressed. I also saw a response about making sure I’m using PC 1.8. I’m not sure how to check that, but I am working in a new experiment which I started today, so I’m thinking it should be ok? Any help is appreciated!

    Thanks!

    #6365
    Jeremy
    Jeremy
    Keymaster

    Hi,

    You don’t see the feedback text because your trial moves to the next one immediately after you print the text. How do you want the participant to move to the next trial? By pressing another key? By clicking a “Next” button? For example, if you want a timer, you could simply add newTimer(3000).start().wait() before the closing parenthesis of newTrial (just don’t forget to add a comma before it to separate it from the preceding block of commands)

    Jeremy

    #6366
    Avatar
    rbieber
    Participant

    got it, thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.