Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
ButtonBoxes
(view source)
Revision as of 12:02, 1 May 2014
318 bytes added
,
12:02, 1 May 2014
→Buttonbox in Python and PsychoPy
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:
Wiki-admin
Bureaucrats
,
Administrators
1,658
edits
Navigation menu
Personal tools
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Help
About
About the TSG
About this Wiki
FAQ
Disclaimer
Survey
Customer Survey
Tools
Special pages
Printable version