{"id":559,"date":"2017-04-19T14:16:10","date_gmt":"2017-04-19T13:16:10","guid":{"rendered":"http:\/\/watchdiana.fail\/blog\/?p=559"},"modified":"2017-04-19T14:38:34","modified_gmt":"2017-04-19T13:38:34","slug":"clinkt","status":"publish","type":"post","link":"https:\/\/watchdiana.fail\/blog\/2017\/04\/19\/clinkt\/","title":{"rendered":"Clinkt"},"content":{"rendered":"<p><a href=\"http:\/\/watchdiana.fail\/blog\/wp-content\/uploads\/2017\/04\/Photo-19-04-2017-14-01-00.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/watchdiana.fail\/blog\/wp-content\/uploads\/2017\/04\/Photo-19-04-2017-14-01-00-300x225.jpg\" alt=\"Pi Larson Scanning\" width=\"300\" height=\"225\" class=\"alignleft size-medium wp-image-562\" srcset=\"https:\/\/watchdiana.fail\/blog\/wp-content\/uploads\/2017\/04\/Photo-19-04-2017-14-01-00-300x225.jpg 300w, https:\/\/watchdiana.fail\/blog\/wp-content\/uploads\/2017\/04\/Photo-19-04-2017-14-01-00-768x576.jpg 768w, https:\/\/watchdiana.fail\/blog\/wp-content\/uploads\/2017\/04\/Photo-19-04-2017-14-01-00-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>I may have got a little carried away.<br \/>\n<\/ br><br \/>\nThe Blinkt hat has a perfectly* good python library which does everything you might reasonably want to do with a set of 8 APA102 lights.  My problem there is the word &#8216;reasonably&#8217;.  So, I re-wrote it in C++, because my soul has never seen the light of day.<br \/>\n<\/ br><br \/>\n(* nearly perfectly.  Some might say that flushing the visible buffer by writing white pixels off the end of it is a little much if you decide to define the number of LEDs as 6 for testing and OW MY EYES.)<br \/>\n<br \/>\nIt&#8217;ll take arbitrary pixel length, just like the python library, but unlike the python library it&#8217;s built with the assumption you&#8217;ll want to make and use multiple patterns, and manipulate those patterns with regard to each other.  I can cross over patterns based on whatever input I like, as long as I painstakingly craft that input and sanitise it myself.<br \/>\n<\/ br><br \/>\nThe reason I wanted to dig deeper than the python framework was that the Raspberry Pi is my lightweight development machine.  I have a laptop that fits into a box.  More on that in the next post.<br \/>\n<\/ br><br \/>\nI&#8217;m reliably informed that it&#8217;s against the law to have a blinkt and not use it to output something something pop culture Davis Hasselhoff &#8211; so here is the Larson Scanner in use: <a href=\"http:\/\/watchdiana.fail\/blog\/wp-content\/uploads\/2017\/04\/Video-19-04-2017-14-00-28.mov\">Video 19-04-2017, 14 00 28<\/a><br \/>\n<\/ br><br \/>\nThe C++ library is available at <a href=\"https:\/\/github.com\/dianaprobst\/clinkt\" target=\"_blank\">https:\/\/github.com\/dianaprobst\/clinkt<\/a>.  You&#8217;ll need the bcm28somethingorother library, but the README.txt has that information.  If you want to use cheerlights or APIs you&#8217;ll also need libcurl.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I may have got a little carried away. The Blinkt hat has a perfectly* good python library which does everything you might reasonably want to do with a set of 8 APA102 lights. My problem there is the word &#8216;reasonably&#8217;. So, I re-wrote it in C++, because my soul has never seen the light of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[95,8,66],"tags":[96,83,88,43,56,48,13],"class_list":["post-559","post","type-post","status-publish","format-standard","hentry","category-blinki","category-coding","category-software-and-firmware","tag-blinki","tag-fun-with-code","tag-fun-with-cplusplus","tag-fun-with-the-raspberry-pi","tag-things-i-do-because-im-bored","tag-things-i-do-because-im-learning","tag-things-i-do-because-im-stubborn","missing-thumbnail"],"_links":{"self":[{"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/posts\/559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/comments?post=559"}],"version-history":[{"count":3,"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/posts\/559\/revisions"}],"predecessor-version":[{"id":564,"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/posts\/559\/revisions\/564"}],"wp:attachment":[{"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/media?parent=559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/categories?post=559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/watchdiana.fail\/blog\/wp-json\/wp\/v2\/tags?post=559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}