{"id":148,"date":"2020-08-19T14:12:00","date_gmt":"2020-08-19T14:12:00","guid":{"rendered":"http:\/\/doctor-dark.co.uk\/blog\/2020\/08\/19\/scrolling-text-on-a-unicornhathd\/"},"modified":"2023-12-18T12:17:45","modified_gmt":"2023-12-18T12:17:45","slug":"scrolling-text-on-a-unicornhathd","status":"publish","type":"post","link":"https:\/\/doctor-dark.co.uk\/blog\/scrolling-text-on-a-unicornhathd\/","title":{"rendered":"Scrolling text on a UnicornHatHD"},"content":{"rendered":"<h2 style=\"text-align: left;\"><span style=\"font-family: verdana;\">Scrolling text on UnicornHatHD<\/span><\/h2>\n<p><span style=\"font-family: verdana;\"><br \/><\/span><\/p>\n<p><span style=\"font-family: verdana;\">I wanted scrolling text on the UnicornHatHD which has a 16&#215;16 LED array, and could only find a program that would do it on the old UnicornHat with its 8&#215;8 array.&nbsp;<\/span><\/p>\n<p><span style=\"font-family: verdana;\"><a href=\"https:\/\/github.com\/topshed\/UnicornHatScroll\">https:\/\/github.com\/topshed\/UnicornHatScroll<\/a><\/span><\/p>\n<p><span style=\"font-family: verdana;\">If you change a couple of lines in UHScroll.py, it works on the UnicornHatHD.<\/span><\/p>\n<p><span style=\"font-family: verdana;\">Change the definition of flip to:-<\/span><\/p>\n<p><span style=\"font-family: courier;\">flip = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]<\/span><\/p>\n<p><span style=\"font-family: verdana;\">and change the start of show_letter() to:-<\/span><\/p>\n<p><span style=\"font-family: courier;\">def show_letter(letter,colour,brightness):&nbsp;<\/span><\/p>\n<p><span style=\"font-family: courier;\">&nbsp; &nbsp; UH.rotation(0)&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<\/span><\/p>\n<p><span style=\"font-family: courier;\">&nbsp; &nbsp; for i in range(16):<\/span><\/p>\n<\/p>\n<p><span style=\"font-family: courier;\">&nbsp; &nbsp; &nbsp; &nbsp; for j in range(8):<\/span><\/p>\n<p><span style=\"font-family: verdana;\">That&#8217;s all you need to scroll text on the top 8 rows of LEDs. It should be fairly easy to use the lower 8 rows as well&#8230;<\/span><\/p>\n<p><span style=\"font-family: verdana;\">Useful?&nbsp;<\/span><\/p>\n<p><span style=\"font-family: verdana;\">#RaspberryPi #Pimoroni #UnicornHatHD<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scrolling text on UnicornHatHD I wanted scrolling text on the UnicornHatHD which has a 16&#215;16 LED array, and could only find a program that would do it on the old UnicornHat with its 8&#215;8 array.&nbsp; https:\/\/github.com\/topshed\/UnicornHatScroll If you change a couple of lines in UHScroll.py, it works on the UnicornHatHD. Change the definition of flip &hellip; <a href=\"https:\/\/doctor-dark.co.uk\/blog\/scrolling-text-on-a-unicornhathd\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Scrolling text on a UnicornHatHD&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-148","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/posts\/148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=148"}],"version-history":[{"count":1,"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/posts\/148\/revisions"}],"predecessor-version":[{"id":420,"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/posts\/148\/revisions\/420"}],"wp:attachment":[{"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doctor-dark.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}