{"id":608,"date":"2015-09-06T22:30:42","date_gmt":"2015-09-06T20:30:42","guid":{"rendered":"http:\/\/heppg.de\/ikg\/wordpress\/?p=608"},"modified":"2015-09-07T21:26:56","modified_gmt":"2015-09-07T19:26:56","slug":"remote-scratch-connection-multipanel-setup","status":"publish","type":"post","link":"https:\/\/heppg.de\/ikg\/wordpress\/?p=608","title":{"rendered":"Remote scratch connection, 2&#215;3 multipanel setup"},"content":{"rendered":"<p>With scratchClient, it is possible to connect multiple scratch instances with events. ScratchClient can combine this feature with other adapters, as GPIO or alike.<\/p>\n<p>To demonstrate a &#8216;chain reaction&#8217; type application, I have connected six scratch screens in a 2*3-array to have a red dot traverse the screens.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"wp-caption-dd alignleft\" src=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2015\/09\/chain_reaction.GIF\" alt=\"\" width=\"669\" height=\"614\" \/><br \/>\nAs I do not own 6 hdmi-monitors for scratch,\u00a0I have collected 6 vnc-sessions with 600*400-resolution on a desktop computer. The video is taken from this machine.<\/p>\n<p>Each scratch instance sends a specific start broadcast to the next scratch instance to trigger the display-move-hide sequence there. So Instance 0 sends &#8216;start_1&#8217;, instance 1 sends &#8216;start_2&#8217; and so on. Instance 5 sends &#8216;start_0&#8217; and the sequence starts again.<\/p>\n<p>The sample is in the scratchClient-distribution, scratch\/chainReaction-folder. If you want to run this sample, you need six raspberry computers. Start scratch\/chainReaction\/reaction_0.sb on each of the raspberryPi. Change the value of &#8216;whoami&#8217; to 0, 1, 2.. 5 and arrange the screens in<\/p>\n<p>0, 1, 2<br \/>\n5, 4, 3<\/p>\n<p>order.<\/p>\n<p>On one of the computers, the scratchCommunicationServer needs to be started.<\/p>\n<pre>cd\u00a0 ~\/scratchClient\r\npython src\/scratchCommunicationServer.py<\/pre>\n<p>For each of the computers, there is a distinct computer-specific config script. Adjust the<\/p>\n<pre>\u00a0&lt;parameter name=\"server\" value=\"192.168.2.90\" \/&gt;\r\n<\/pre>\n<p>in the config-files to match the ip-address of the server computer.<\/p>\n<p>For computer 0, use config_start_0.xml:<\/p>\n<pre>cd\u00a0 ~\/scratchClient\r\nsudo python src\/scratchClient.py -c scratch\/chainReaction\/config_start_0.xml<\/pre>\n<p>and start scratchClient on other computers with config_start_&lt;N&gt;.xml, N=1..5.<\/p>\n<p>The remote connection adapter can be combined with other adapters like GPIO or whatever needed. This is the reason to start the python application with sudo.<\/p>\n<p>The current configuration combines the remote communication adapter with a GPIO output on GPIO18. This is a feature unique to scratchClient.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With scratchClient, it is possible to connect multiple scratch instances with events. ScratchClient can combine this feature with other adapters, as GPIO or alike. To demonstrate a &#8216;chain reaction&#8217; type application, I have connected six scratch screens in a 2*3-array to have a red dot traverse the screens. As I do not own 6 hdmi-monitors [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,3],"tags":[],"class_list":["post-608","post","type-post","status-publish","format-standard","hentry","category-scratch","category-scratchclient"],"_links":{"self":[{"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/608","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=608"}],"version-history":[{"count":5,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/608\/revisions"}],"predecessor-version":[{"id":613,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/608\/revisions\/613"}],"wp:attachment":[{"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}