{"id":21,"date":"2022-12-20T22:44:15","date_gmt":"2022-12-20T22:44:15","guid":{"rendered":"https:\/\/csguy.org\/technotes\/?p=21"},"modified":"2023-02-04T01:21:47","modified_gmt":"2023-02-04T01:21:47","slug":"shifting-columns","status":"publish","type":"post","link":"https:\/\/csguy.org\/technotes\/shifting-columns\/","title":{"rendered":"Shifting Columns"},"content":{"rendered":"\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/csguy.org\/technotes\/wp-content\/uploads\/2022\/12\/shift.mp4\"><\/video><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">the segments are wired oddly making software a bit wonky for the 2 rows.  The segments are &#8230;.<br>     0123<br>     7654<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#include &lt;LedControl.h&gt;\n\nint p; byte x, y, s; byte z[65] = {};\n\nLedControl lc = LedControl(11, 13, 7, 8); \/\/ DIN,CLK,CS,SEGS\n\nvoid setup() {\n  int devices = lc.getDeviceCount(); \n    for (int address = 0; address &lt; devices; address++) \n        {lc.shutdown(address, false); \n        lc.setIntensity(address, 0); \n        lc.clearDisplay(address);} \n    for (s = 0; s &lt; 8; s++) {lc.clearDisplay(s);} \n    for (p=0;p&lt;65;p++) {z[p]=random(0,255);}\n}\n\nvoid loop()  {x = 0; s = 0; p = 0;\n  while (s &lt; 4) {\n    z[p] = z[p + 1];\n    lc.setColumn(s, 7 - x, z[p]);\n    z[p + 32] = z[p + 33];\n    lc.setColumn(7 - s, x, z[p + 32]);\n    x++;p++; \n    if (x == 8) {x = 0; s++;}}\n    \n  z[32] = random(0, 255); z[64] = random(0, 255); \n  lc.setColumn(0, 7, z[32]); \n  lc.setColumn(7, 0, z[64]);\n}<\/pre>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/csguy.org\/technotes\/wp-content\/uploads\/2023\/02\/better.mp4\"><\/video><figcaption class=\"wp-element-caption\">Final version eliminated flicker&#8230;.. much better<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>the segments are wired oddly making software a bit wonky for the 2 rows. The segments are &#8230;. 0123 7654 #include &lt;LedControl.h&gt; int p; byte x, y, s; byte z[65] = {}; LedControl lc = LedControl(11, 13, 7, 8); \/\/ DIN,CLK,CS,SEGS void setup() { int devices = lc.getDeviceCount(); for (int address = 0; address &lt; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-21","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Shifting Columns - Tech Notes<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/csguy.org\/technotes\/shifting-columns\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Shifting Columns - Tech Notes\" \/>\n<meta property=\"og:description\" content=\"the segments are wired oddly making software a bit wonky for the 2 rows. The segments are &#8230;. 0123 7654 #include &lt;LedControl.h&gt; int p; byte x, y, s; byte z[65] = {}; LedControl lc = LedControl(11, 13, 7, 8); \/\/ DIN,CLK,CS,SEGS void setup() { int devices = lc.getDeviceCount(); for (int address = 0; address &lt; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/csguy.org\/technotes\/shifting-columns\/\" \/>\n<meta property=\"og:site_name\" content=\"Tech Notes\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-20T22:44:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-04T01:21:47+00:00\" \/>\n<meta name=\"author\" content=\"barry hills\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"barry hills\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/shifting-columns\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/shifting-columns\\\/\"},\"author\":{\"name\":\"barry hills\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/#\\\/schema\\\/person\\\/89e2d600fe21bcb92d502289e27831a4\"},\"headline\":\"Shifting Columns\",\"datePublished\":\"2022-12-20T22:44:15+00:00\",\"dateModified\":\"2023-02-04T01:21:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/shifting-columns\\\/\"},\"wordCount\":24,\"commentCount\":0,\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/csguy.org\\\/technotes\\\/shifting-columns\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/shifting-columns\\\/\",\"url\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/shifting-columns\\\/\",\"name\":\"Shifting Columns - Tech Notes\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/#website\"},\"datePublished\":\"2022-12-20T22:44:15+00:00\",\"dateModified\":\"2023-02-04T01:21:47+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/#\\\/schema\\\/person\\\/89e2d600fe21bcb92d502289e27831a4\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/shifting-columns\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/csguy.org\\\/technotes\\\/shifting-columns\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/shifting-columns\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Shifting Columns\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/#website\",\"url\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/\",\"name\":\"Tech Notes\",\"description\":\"Sharing the tech\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/#\\\/schema\\\/person\\\/89e2d600fe21bcb92d502289e27831a4\",\"name\":\"barry hills\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e7df4c371d55904f1d858a9d27549d002b93713cd2f13d672c3c0898efcb70b4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e7df4c371d55904f1d858a9d27549d002b93713cd2f13d672c3c0898efcb70b4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e7df4c371d55904f1d858a9d27549d002b93713cd2f13d672c3c0898efcb70b4?s=96&d=mm&r=g\",\"caption\":\"barry hills\"},\"url\":\"https:\\\/\\\/csguy.org\\\/technotes\\\/author\\\/barry\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Shifting Columns - Tech Notes","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/csguy.org\/technotes\/shifting-columns\/","og_locale":"en_US","og_type":"article","og_title":"Shifting Columns - Tech Notes","og_description":"the segments are wired oddly making software a bit wonky for the 2 rows. The segments are &#8230;. 0123 7654 #include &lt;LedControl.h&gt; int p; byte x, y, s; byte z[65] = {}; LedControl lc = LedControl(11, 13, 7, 8); \/\/ DIN,CLK,CS,SEGS void setup() { int devices = lc.getDeviceCount(); for (int address = 0; address &lt; [&hellip;]","og_url":"https:\/\/csguy.org\/technotes\/shifting-columns\/","og_site_name":"Tech Notes","article_published_time":"2022-12-20T22:44:15+00:00","article_modified_time":"2023-02-04T01:21:47+00:00","author":"barry hills","twitter_card":"summary_large_image","twitter_misc":{"Written by":"barry hills","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/csguy.org\/technotes\/shifting-columns\/#article","isPartOf":{"@id":"https:\/\/csguy.org\/technotes\/shifting-columns\/"},"author":{"name":"barry hills","@id":"https:\/\/csguy.org\/technotes\/#\/schema\/person\/89e2d600fe21bcb92d502289e27831a4"},"headline":"Shifting Columns","datePublished":"2022-12-20T22:44:15+00:00","dateModified":"2023-02-04T01:21:47+00:00","mainEntityOfPage":{"@id":"https:\/\/csguy.org\/technotes\/shifting-columns\/"},"wordCount":24,"commentCount":0,"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/csguy.org\/technotes\/shifting-columns\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/csguy.org\/technotes\/shifting-columns\/","url":"https:\/\/csguy.org\/technotes\/shifting-columns\/","name":"Shifting Columns - Tech Notes","isPartOf":{"@id":"https:\/\/csguy.org\/technotes\/#website"},"datePublished":"2022-12-20T22:44:15+00:00","dateModified":"2023-02-04T01:21:47+00:00","author":{"@id":"https:\/\/csguy.org\/technotes\/#\/schema\/person\/89e2d600fe21bcb92d502289e27831a4"},"breadcrumb":{"@id":"https:\/\/csguy.org\/technotes\/shifting-columns\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/csguy.org\/technotes\/shifting-columns\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/csguy.org\/technotes\/shifting-columns\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/csguy.org\/technotes\/"},{"@type":"ListItem","position":2,"name":"Shifting Columns"}]},{"@type":"WebSite","@id":"https:\/\/csguy.org\/technotes\/#website","url":"https:\/\/csguy.org\/technotes\/","name":"Tech Notes","description":"Sharing the tech","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/csguy.org\/technotes\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/csguy.org\/technotes\/#\/schema\/person\/89e2d600fe21bcb92d502289e27831a4","name":"barry hills","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e7df4c371d55904f1d858a9d27549d002b93713cd2f13d672c3c0898efcb70b4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e7df4c371d55904f1d858a9d27549d002b93713cd2f13d672c3c0898efcb70b4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e7df4c371d55904f1d858a9d27549d002b93713cd2f13d672c3c0898efcb70b4?s=96&d=mm&r=g","caption":"barry hills"},"url":"https:\/\/csguy.org\/technotes\/author\/barry\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/posts\/21","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/comments?post=21"}],"version-history":[{"count":4,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/posts\/21\/revisions"}],"predecessor-version":[{"id":36,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/posts\/21\/revisions\/36"}],"wp:attachment":[{"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/media?parent=21"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/categories?post=21"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csguy.org\/technotes\/wp-json\/wp\/v2\/tags?post=21"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}