ButtonBox: Difference between revisions

Jump to navigation Jump to search
No edit summary
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>