{"id":16645,"date":"2021-03-06T08:38:07","date_gmt":"2021-03-06T13:38:07","guid":{"rendered":"https:\/\/scruss.com\/blog\/?p=16645"},"modified":"2021-03-06T08:40:33","modified_gmt":"2021-03-06T13:40:33","slug":"seeeduino-xiao-simple-usb-volume-control-with-circuitpython","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2021\/03\/06\/seeeduino-xiao-simple-usb-volume-control-with-circuitpython\/","title":{"rendered":"Seeeduino XIAO simple USB volume control with CircuitPython"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"800\" src=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2021\/03\/Seeeduino_Xiao-Volume_Control.jpg\" alt=\"round computer device with USB cable exiting at left. Small microcontroller at centreshowing wiring to LED ring and rotary encoder\" class=\"wp-image-16646\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2021\/03\/Seeeduino_Xiao-Volume_Control.jpg 800w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2021\/03\/Seeeduino_Xiao-Volume_Control-320x320.jpg 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2021\/03\/Seeeduino_Xiao-Volume_Control-160x160.jpg 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2021\/03\/Seeeduino_Xiao-Volume_Control-768x768.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption>Slightly blurry image of the underside of the device, showing the Seeeduino XIAO and the glow from the NeoPixel ring. And yes, the XIAO is really that small<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Tod Kurt&#8217;s <a href=\"https:\/\/todbot.com\/blog\/2021\/02\/25\/qtpy-knob-simple-usb-knob-w-circuitpython\/\">QTPy-knob: Simple USB knob w\/ CircuitPython<\/a> is a fairly simple USB input project that relies on the pin spacing of an <a href=\"https:\/\/www.adafruit.com\/product\/4600\">Adafruit QT Py<\/a> development board being the same as that on a <a href=\"https:\/\/www.adafruit.com\/product\/377\">Bourns Rotary Encoder<\/a>. If you want to get fancy (and who wouldn&#8217;t?) you can add a <a href=\"https:\/\/www.adafruit.com\/product\/1463\">NeoPixel Ring<\/a> to get an RGB glow.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The QT Py is based on the <a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html\">Seeeduino XIAO<\/a>, which is a slightly simpler device than the Adafruit derivative. It still runs <a href=\"https:\/\/circuitpython.org\/board\/seeeduino_xiao\/\">CircuitPython<\/a>, though, and is about the least expensive way of doing so. The XIAO is drop-in replacement for the Qt Py in this project, and it works really well! Everything you need for the project is described here: <a href=\"https:\/\/github.com\/todbot\/qtpy-knob\">todbot\/qtpy-knob: QT Py Media Knob using rotary encoder &amp; neopixel ring<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I found a couple of tiny glitches in the 3d printed parts, though:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>The diffuser ring for the LED ring is too thick for the encoder lock nut to fasten. It&#8217;s 2 mm thick, and there&#8217;s exactly 2 mm of thread left on the encoder.<\/li><li>The D-shaft cutout in the top is too deep to allow the encoder shaft switch to trigger.<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">I bodged these by putting an indent in the middle of the diffuser, and filling the top D-shaft cutout with just enough Blu Tack.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Tod&#8217;s got a bunch of other projects for the Qt Py that I&#8217;m sure would work well with the XIAO: <a href=\"https:\/\/github.com\/todbot\/qtpy-tricks\">QT Py Tricks<\/a>. And yes, there&#8217;s an \u00e2\u20ac\u0153<a href=\"https:\/\/github.com\/todbot\/qtpy-tricks#output-farty-noises-to-dac\">Output Farty Noises to DAC<\/a>\u00e2\u20ac\u009d one that, regrettably, does just that.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Maybe I&#8217;ll add some mass to the dial to make it scroll more smoothly like those buttery shuttle dials from old video editing consoles. The base could use a bit more weight to stop it skiting about the desk, so maybe I&#8217;ll use Vik&#8217;s trick of embedding BB gun shot into hot glue. For now, I&#8217;ve put some rubber feet on it, and it mostly stays put.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Hey! Unlike my last <a href=\"https:\/\/scruss.com\/blog\/2021\/02\/10\/seeedstudio-wio-terminal\/\">Seeed Studio device post<\/a>, I paid for all the bits mentioned here.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tod Kurt&#8217;s QTPy-knob: Simple USB knob w\/ CircuitPython is a fairly simple USB input project that relies on the pin spacing of an Adafruit QT Py development board being the same as that on a Bourns Rotary Encoder. If you want to get fancy (and who wouldn&#8217;t?) you can add a NeoPixel Ring to get [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Seeeduino XIAO simple USB volume control with CircuitPython. Thanks for the great design, @todbot!","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7,2],"tags":[3207,3105,3256,229],"class_list":["post-16645","post","type-post","status-publish","format-standard","hentry","category-computers-suck","category-goatee-stroking-musing-or-something","tag-3dprinting","tag-circuitpython","tag-seeed","tag-usb"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-4kt","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/16645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=16645"}],"version-history":[{"count":2,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/16645\/revisions"}],"predecessor-version":[{"id":16648,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/16645\/revisions\/16648"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=16645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=16645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=16645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}