Line 53: |
Line 53: |
| | | |
| ==Usage== | | ==Usage== |
− | ''(Under Construction)''<br/>
| + | == Python == |
− | We are working on templates and tips. Stay tuned!
| + | <syntaxhighlight lang="python" line> |
− | *[[Unity/Timing]]
| + | #!/usr/bin/env python |
| | | |
− | ===Builds=== | + | # import the rusocsci.buttonbox module |
− | We advise not to run your experiment from the Unity Editor, this will cause unwanted overhead that harms the performance. You can create a PC Standalone build to run it on our [[Computers | lab computers]].
| + | 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 |
| + | core.wait(0.002) #2ms delay for the code to be recorded by brainvision; 2ms->500hz sampling rate |
| + | bb.sendMarker(0) #Back to 0; now ready to send a new code |
| + | </syntaxhighlight> |
| | | |
| ==References== | | ==References== |