{"id":303,"date":"2014-07-12T09:12:36","date_gmt":"2014-07-12T07:12:36","guid":{"rendered":"http:\/\/heppg.de\/ikg\/wordpress\/?p=303"},"modified":"2014-07-12T09:12:36","modified_gmt":"2014-07-12T07:12:36","slug":"scratch-connection-status-display","status":"publish","type":"post","link":"https:\/\/heppg.de\/ikg\/wordpress\/?p=303","title":{"rendered":"Scratch Connection Status Display"},"content":{"rendered":"<p>With a new adapter adapter.gpio.GpioStateOutput, it is possible to bring the scratch connection state to GPIO.<\/p>\n<p>When scratchClient is started, the associated GPIO pin is going high. When connection to scratch is established, the pin is blinking slowly. And when scratchClient is terminated, the GPIO is going low.<br \/>\nJust add the configuration f\u00fcr this adapter to your configuration.<\/p>\n<pre>\u00a0\u00a0\u00a0 &lt;adapter class='adapter.gpio.GpioStateOutput'\u00a0 name='state'&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;description&gt;State display on IKG.IO.9&lt;\/description&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;gpio port='IKG.IO.9' alias='state'&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;default dir='OUT'\u00a0 default='low' \/&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;active\u00a0 dir='OUT'\u00a0 default='low' \/&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/gpio&gt;\r\n\u00a0\u00a0\u00a0 &lt;\/adapter&gt;<\/pre>\n<p>Please note the naming of the port: these names are configurable. You could use GPIO04 instead, or P1-07 if you prefer board numbering.<br \/>\nFor my school workshop, there is an extra LED available, connected all the time, but not used for other IO. This LED sits on the adapter board in a corner and is ideally suited for a state display.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With a new adapter adapter.gpio.GpioStateOutput, it is possible to bring the scratch connection state to GPIO. When scratchClient is started, the associated GPIO pin is going high. When connection to scratch is established, the pin is blinking slowly. And when scratchClient is terminated, the GPIO is going low. Just add the configuration f\u00fcr this adapter [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7,3],"tags":[],"class_list":["post-303","post","type-post","status-publish","format-standard","hentry","category-adapterboard","category-experimentierbox","category-scratchclient"],"_links":{"self":[{"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=303"}],"version-history":[{"count":1,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/303\/revisions"}],"predecessor-version":[{"id":304,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/303\/revisions\/304"}],"wp:attachment":[{"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}