<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://tsgdoc.socsci.ru.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=145.116.156.217</id>
	<title>TSG Doc - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://tsgdoc.socsci.ru.nl/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=145.116.156.217"/>
	<link rel="alternate" type="text/html" href="http://tsgdoc.socsci.ru.nl/index.php/Special:Contributions/145.116.156.217"/>
	<updated>2026-04-18T18:18:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.4</generator>
	<entry>
		<id>http://tsgdoc.socsci.ru.nl/index.php?title=ButtonBox&amp;diff=153</id>
		<title>ButtonBox</title>
		<link rel="alternate" type="text/html" href="http://tsgdoc.socsci.ru.nl/index.php?title=ButtonBox&amp;diff=153"/>
		<updated>2014-03-17T10:30:53Z</updated>

		<summary type="html">&lt;p&gt;145.116.156.217: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General ==&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
== Revisions ==&lt;br /&gt;
&lt;br /&gt;
Revision 1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision 3&lt;br /&gt;
&lt;br /&gt;
Revision 4&lt;br /&gt;
&lt;br /&gt;
== Presentation Settings ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| [[File:Buttonbox1.png]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Psychopy Settings ==&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
 #!/usr/bin/env python&lt;br /&gt;
&lt;br /&gt;
 from psychopy import core, visual, event from rusocsci import buttonbox import logging, time&lt;br /&gt;
&lt;br /&gt;
 ##Setup Section&lt;br /&gt;
 #logging.getLogger().setLevel(logging.DEBUG) # use this for debug info&lt;br /&gt;
&lt;br /&gt;
 win = visual.Window([400,300], monitor=&amp;quot;testMonitor&amp;quot;) bb = buttonbox.Buttonbox()&lt;br /&gt;
&lt;br /&gt;
 ##Experiment Section&lt;br /&gt;
&lt;br /&gt;
 b = bb.waitButtons(maxWait = 10.0, buttonList=['A']) print(&amp;quot;b: {}&amp;quot;.format(b))&lt;br /&gt;
&lt;br /&gt;
 ##Cleanup Section&lt;br /&gt;
&lt;br /&gt;
 core.quit() The following script lights the LEDs under the buttons pressed.&lt;br /&gt;
&lt;br /&gt;
 #!/usr/bin/env python&lt;br /&gt;
 #from __future__ import print_function&lt;br /&gt;
&lt;br /&gt;
 import logging, time, sys from rusocsci import buttonbox&lt;br /&gt;
&lt;br /&gt;
 ##Setup Section&lt;br /&gt;
&lt;br /&gt;
 led = [False]*8&lt;br /&gt;
&lt;br /&gt;
 ##Experiment Section&lt;br /&gt;
&lt;br /&gt;
 bb = buttonbox.Buttonbox() while True:&lt;br /&gt;
&lt;br /&gt;
  buttons = bb.getButtons()&lt;br /&gt;
  if len(buttons):&lt;br /&gt;
  for c in buttons:&lt;br /&gt;
  if ord(c) &amp;gt;= ord('a') and ord(c) &amp;lt; ord('a')+8:&lt;br /&gt;
  led[ord(c) - ord('a')] = False&lt;br /&gt;
  elif ord(c) &amp;gt;= ord('A') and ord(c) &amp;lt; ord('A')+8:&lt;br /&gt;
  led[ord(c) - ord('A')] = True&lt;br /&gt;
  bb.setLeds(led)&lt;br /&gt;
  #print(&amp;quot;buttons ({:3d}): {}{}&amp;quot;.format(len(buttons), buttons, &amp;quot; &amp;quot;*50), end=&amp;quot;\r&amp;quot;)&lt;br /&gt;
  #sys.stdout.flush()&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Matlab Settings ==&lt;br /&gt;
&lt;br /&gt;
== Inquisit Settings ==&lt;br /&gt;
&lt;br /&gt;
== E-Prime ==&lt;/div&gt;</summary>
		<author><name>145.116.156.217</name></author>
	</entry>
</feed>