Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
ButtonBoxes
(view source)
Revision as of 17:12, 1 February 2016
489 bytes added
,
17:12, 1 February 2016
no edit summary
Line 229:
Line 229:
# print the button pressed
# print the button pressed
print("b: {}".format(b))
print("b: {}".format(b))
+
</syntaxhighlight>
+
+
'''Example using BITSI extended in Python:'''
+
+
<syntaxhighlight lang="python" line>
+
#!/usr/bin/env python
+
+
# import the rusocsci.buttonbox module
+
from rusocsci import buttonbox
+
+
# make a buttonbox
+
bb = buttonbox.Buttonbox()
+
+
# select a function
+
bb.sendMarker(val=(ord(X))) #select pulse time
+
bb.sendMarker(val=2) #set time of dureation pulse to 2ms
+
+
bb.sendMarker(val=(ord(M))) #select marker out
+
bb.sendMarker(val=115) #set marker value 115
</syntaxhighlight>
</syntaxhighlight>
P.dewater
Administrators
169
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