{"id":948,"date":"2017-03-21T15:10:20","date_gmt":"2017-03-21T14:10:20","guid":{"rendered":"http:\/\/heppg.de\/ikg\/wordpress\/?p=948"},"modified":"2017-03-21T15:10:20","modified_gmt":"2017-03-21T14:10:20","slug":"scratchclient-and-scroll_phat_hd","status":"publish","type":"post","link":"https:\/\/heppg.de\/ikg\/wordpress\/?p=948","title":{"rendered":"scratchClient and scroll_phat_hd"},"content":{"rendered":"<p>There is a nice little led matrix moard from PIMORONI, &#8220;SCROLL PHAT HD&#8221;. The form factor is for the pi zero, but it runs well also with a pi 3.<\/p>\n<p><a href=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2017\/03\/scroll_phat_hd.gif\"><img decoding=\"async\" class=\"alignnone\" src=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2017\/03\/scroll_phat_hd.gif\" alt=\"scroll_phat_hd\" \/><\/a><\/p>\n<p>scratchClient offers support for this board.<\/p>\n<p>The interface allows to set pixel with brightness, write large and somewhat smaller text and of course clear the display.<\/p>\n<p>There is a sample scratch script in scratch\/scrollphathd\/scroll_phat_hd.sb<\/p>\n<p><a href=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2017\/03\/scroll_phat_hd_stage.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-949\" src=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2017\/03\/scroll_phat_hd_stage-300x225.gif\" alt=\"\" width=\"300\" height=\"225\" \/><\/a><\/p>\n<p>There are quite a few commands from scratch which need parameters.<br \/>\nThis is not a trivial task with scratch. Here a variable is used as a &#8216;command&#8217;-Variable &#8216;sph_command which receives operation names optionally with parameters.<\/p>\n<p><a href=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2017\/03\/scroll_phat_hd_clear.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-950\" src=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2017\/03\/scroll_phat_hd_clear.png\" alt=\"\" width=\"184\" height=\"26\" \/><br \/>\n<\/a>Clear the display. There is also a broadcast command for this &#8216;clearDisplay&#8217;<a href=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2017\/03\/scroll_phat_hd_pixel.png\"><br \/>\n<\/a><\/p>\n<p><a href=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2017\/03\/scroll_phat_hd_pixel.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-951\" src=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2017\/03\/scroll_phat_hd_pixel.png\" alt=\"\" width=\"237\" height=\"29\" \/><br \/>\n<\/a>Set a pixel at x=1, y=1, brightness = 1.0. Valid ranges are x in [0..16], y in [0..6], brightness is [0.0..1.0]. Values out of scope are ignored.<\/p>\n<p><a href=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2017\/03\/scroll_phat_hd_box.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-952\" src=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2017\/03\/scroll_phat_hd_box.png\" alt=\"\" width=\"254\" height=\"27\" \/><br \/>\n<\/a>Draw a box between two pixels, here between [0;0] and [17;7] with brightness 0.3. This command effectively sets all led to on.<\/p>\n<p>There are two text variables provided with a 5*7-font and a 3*5 font. Not all chars are supported. The 5*7 font basically supports ascii, the 3*5 font supports digits and some extra chars as ,;.:-_+\\\/.<br \/>\nThe fonts are defined in &#8216;pseudographics&#8217; in a python file and can easily be expanded.<\/p>\n<p>There is a sample config file available, start scratchClient with<\/p>\n<pre>cd ~\/scratchClient\r\npython src\/scratchClient.py -c config_scrollphathd<\/pre>\n<p>The adapter code has been written based on code from pimoroni.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is a nice little led matrix moard from PIMORONI, &#8220;SCROLL PHAT HD&#8221;. The form factor is for the pi zero, but it runs well also with a pi 3. scratchClient offers support for this board. The interface allows to set pixel with brightness, write large and somewhat smaller text and of course clear the [&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,1],"tags":[],"class_list":["post-948","post","type-post","status-publish","format-standard","hentry","category-scratch","category-scratchclient","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/948","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=948"}],"version-history":[{"count":2,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/948\/revisions"}],"predecessor-version":[{"id":954,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/948\/revisions\/954"}],"wp:attachment":[{"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}