{"id":468,"date":"2015-05-05T22:56:22","date_gmt":"2015-05-05T20:56:22","guid":{"rendered":"http:\/\/heppg.de\/ikg\/wordpress\/?p=468"},"modified":"2015-05-08T21:30:09","modified_gmt":"2015-05-08T19:30:09","slug":"scratchclient-and-piface-2","status":"publish","type":"post","link":"https:\/\/heppg.de\/ikg\/wordpress\/?p=468","title":{"rendered":"scratchClient and piGlow"},"content":{"rendered":"<p>piGlow is a nice little board, providing 18 colored LED with an I2C-Controller.<\/p>\n<p>With a major rework of the i2c-part of the scratchClient framework, I added support for this board \/ device in scratchClient.<\/p>\n<p>Start it with<\/p>\n<pre>cd ~\/scratchClient\r\nsudo python src\/scratchClient.py -c config\/config_SN3218.xml \r\n<\/pre>\n<p>The configuration uses some common variables to update the pwm-values in sync for all, for the &#8216;branches&#8217; and &#8211; of course &#8211; the individual LED.<br \/>\nIn the distribution, there is a simple scratch program, just providing variable definitions and some watchers on stage with sliders.<br \/>\n<a href=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2015\/05\/piglow_scratch.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-476\" src=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2015\/05\/piglow_scratch.png\" alt=\"piglow_scratch\" width=\"493\" height=\"402\" \/><\/a><\/p>\n<p>Not very graphic, I agree. But hopefully it saves some time in creating these 18 variable names (plus some more). It is in scratchClient\/scratch\/SN3218\/piglow.sb<\/p>\n<p>The branches are group names for the three wings arranged on the board.<\/p>\n<p><a href=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2015\/05\/piglow_annotated.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-477\" src=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2015\/05\/piglow_annotated.png\" alt=\"piglow_annotated\" width=\"490\" height=\"326\" \/><\/a><\/p>\n<p>The above sketch shows the piglow board in action, annotated with the channel numbers in hex.<\/p>\n<p>As indicated on the package of piGlow, the LED can be VERY bright when full power is applied. Looking into these light could harm your eyes.<\/p>\n<p>But there is a trick to project an image of the LED to a remote screen (or the ceiling of my room).<br \/>\nUse a magnifying glass or an objective lens.<br \/>\n<a href=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2015\/05\/lupe.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-496\" src=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2015\/05\/lupe.jpg\" alt=\"lupe\" width=\"300\" height=\"161\" \/><\/a><\/p>\n<p>When adjusting the setup, be sure NOT to have the LED at full brightness.<\/p>\n<p><a href=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2015\/05\/aufbau.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-497\" src=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2015\/05\/aufbau.jpg\" alt=\"aufbau\" width=\"301\" height=\"281\" \/><\/a><\/p>\n<p>Place the lens in the correct distance in front of piGlow. I first tried out which distance is needed by hand, and then fine tuned the focus by adding sheets of paper. It was needed to place the lens in a stable position for the photograph.<\/p>\n<p><a href=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2015\/05\/result.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-498\" src=\"http:\/\/heppg.de\/ikg\/wordpress\/wp-content\/uploads\/2015\/05\/result.jpg\" alt=\"result\" width=\"600\" height=\"436\" \/><\/a><br \/>\nThe result on the ceiling, prox 0.3m large, 1.6m away. The dark grey structured background is the white ceiling, outshined by the image of the LED.<\/p>\n<p>The center LED are opaque, the other LED show the bright chip inside the small package. The image in this setup was 15 times enlarged.<br \/>\nAgain: never look into the bright light directly.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>piGlow is a nice little board, providing 18 colored LED with an I2C-Controller. With a major rework of the i2c-part of the scratchClient framework, I added support for this board \/ device in scratchClient. Start it with cd ~\/scratchClient sudo python src\/scratchClient.py -c config\/config_SN3218.xml The configuration uses some common variables to update the pwm-values in [&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":[20,18],"class_list":["post-468","post","type-post","status-publish","format-standard","hentry","category-scratch","category-scratchclient","tag-photography","tag-piglow"],"_links":{"self":[{"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/468","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=468"}],"version-history":[{"count":10,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/468\/revisions"}],"predecessor-version":[{"id":501,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/468\/revisions\/501"}],"wp:attachment":[{"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/heppg.de\/ikg\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}