{"id":1409,"date":"2022-12-21T18:35:11","date_gmt":"2022-12-21T09:05:11","guid":{"rendered":"https:\/\/ale.chenonetta.com\/blog\/?p=1409"},"modified":"2022-12-21T19:42:57","modified_gmt":"2022-12-21T10:12:57","slug":"using-the-usb-connection-to-drive-squid-beakon-colours","status":"publish","type":"post","link":"https:\/\/ale.chenonetta.com\/blog\/2022\/12\/using-the-usb-connection-to-drive-squid-beakon-colours\/","title":{"rendered":"Using the USB connection to drive Squid Beakon colours"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Squid Beakon + Web Serial updates\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/BRoZ7WZAjiM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>So I&#8217;ve been thinking for a while, &#8220;wifi control of these lamps is all well and good, but I&#8217;d really rather push data over a serial connection so that I can avoid having to set up wifi networks. Also, serial just makes more sense for high throughput usecases, eg sending a continuous stream of updates&#8221;<\/p>\n\n\n\n<p>&#8220;&#8230;Too bad WLED doesn&#8217;t have a serial API&#8221;<\/p>\n\n\n\n<p>You know what they say about when you assume things? I don&#8217;t know why I never really looked it up, but I just figured that WLED didn&#8217;t have serial support. Turns out it actually supports multiple protocols, and as of 0.13.0 it can receive the same JSON commands via serial as it does via wifi.<\/p>\n\n\n\n<p>So here&#8217;s a little video of a proof of concept I put together, to learn a couple of things. It&#8217;s my first time playing around with web serial &#8211; I lifted heavily from <a href=\"https:\/\/codelabs.developers.google.com\/codelabs\/web-serial\" rel=\"noreferrer noopener\" target=\"_blank\">this Codelab<\/a> to get things working.<\/p>\n\n\n\n<p>If you own one of my USB powered lamps, you can test out the controls at this link: <a href=\"https:\/\/difficult-clean-scapula.glitch.me\/\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/difficult-clean-scapula.glitch.me<\/a>&nbsp;<\/p>\n\n\n\n<p>Note that the proof of concept page is very rough around the edges, and it only supports solid colours.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.patreon.com\/chenonetta\/posts?filters%5Btag%5D=rgb%20lamp\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I&#8217;ve been thinking for a while, &#8220;wifi control of these lamps is all well and good, but I&#8217;d really rather push data over a serial connection so that I can avoid having to set up wifi networks. Also, serial just makes more sense for high throughput usecases, eg sending a continuous stream of updates&#8221; &#8230; <a class=\"more-link\" href=\"https:\/\/ale.chenonetta.com\/blog\/2022\/12\/using-the-usb-connection-to-drive-squid-beakon-colours\/\"><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[54,507],"tags":[497,510,243],"class_list":{"0":"entry","1":"post","2":"publish","3":"author-admin","4":"post-1409","6":"format-standard","7":"category-code-2","8":"category-electronics","9":"post_tag-lamp","10":"post_tag-squid-lamp","11":"post_tag-wip-2"},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ale.chenonetta.com\/blog\/wp-json\/wp\/v2\/posts\/1409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ale.chenonetta.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ale.chenonetta.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ale.chenonetta.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ale.chenonetta.com\/blog\/wp-json\/wp\/v2\/comments?post=1409"}],"version-history":[{"count":0,"href":"https:\/\/ale.chenonetta.com\/blog\/wp-json\/wp\/v2\/posts\/1409\/revisions"}],"wp:attachment":[{"href":"https:\/\/ale.chenonetta.com\/blog\/wp-json\/wp\/v2\/media?parent=1409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ale.chenonetta.com\/blog\/wp-json\/wp\/v2\/categories?post=1409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ale.chenonetta.com\/blog\/wp-json\/wp\/v2\/tags?post=1409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}