Changes

Jump to navigation Jump to search
489 bytes added ,  16: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>
  

Navigation menu