Changes

Jump to navigation Jump to search
318 bytes added ,  12:02, 1 May 2014
Line 412: Line 412:  
== Buttonbox in Python and PsychoPy ==
 
== Buttonbox in Python and PsychoPy ==
   −
Example using the buttonbox in Python:
+
Example using buttons from the buttonbox in Python:
    
  <nowiki>
 
  <nowiki>
Line 428: Line 428:  
# print the button pressed
 
# print the button pressed
 
print("b: {}".format(b)) </nowiki>
 
print("b: {}".format(b)) </nowiki>
 +
 +
Example using markers with the buttonbox in Python:
 +
<nowiki>
 +
#!/usr/bin/env python
 +
 +
# import the rusocsci.buttonbox module
 +
from rusocsci import buttonbox
 +
 +
# make a buttonbox
 +
bb = buttonbox.Buttonbox()
 +
 +
# wait for a single button press
 +
bb.sendMarker(100)    #This is your marker code, range code 1-255
 +
    
Example using the Buttonbox in PsychoPy:
 
Example using the Buttonbox in PsychoPy:

Navigation menu