[{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/630/original/MediaHub-Cover.png?1739631753","metadata":{}},{"element_type":"text","content":"\n  \n        \u003ch1\u003eOverview\u003c/h1\u003e\n\u003cp\u003ePhysical controls for a more enjoyable media playback experience.\u003c/p\u003e\n\u003cp\u003eFeatures\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eResponsive volume knob \u0026amp; mute button.\u003c/li\u003e\n\u003cli\u003eTransport controls (play/pause, stop, FF/REW, skip tracks).\u003c/li\u003e\n\u003cli\u003ePair up with your favourite Bluetooth® speakers.\u003c/li\u003e\n\u003cli\u003eQuick, physical connection (don't have to go through menu system to pair with keypad \u0026amp; speakers).\u003c/li\u003e\n\u003cli\u003eCustomizable controls/scheme.\u003c/li\u003e\n\u003cli\u003eCustomizable setup: Optionally connect USB hub/dock for added features, for example:\n\u003cul\u003e\n\u003cli\u003emirror phone to TV w/HDMI out: Watch videos on a bigger screen\u003c/li\u003e\n\u003cli\u003eadd keyboard: Better typing experience for texts/emails.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003eSolderless project.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch1\u003eMain hardware\u003c/h1\u003e\n      \n","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/5100","metadata":{"name":"RP2040 macropad","url":"https://www.adafruit.com/product/5100","description":"Fairly complete control inteface (some assembly required)","quantity":"1","featured":false}},{"element_type":"product","content":"https://www.adafruit.com/product/5103","metadata":{"name":"Macropad add-on hardware","url":"https://www.adafruit.com/product/5103","description":"Nice extras","quantity":"1","featured":false}},{"element_type":"product","content":"https://www.adafruit.com/product/5530","metadata":{"name":"Aluminum Knob (20mm)","url":"https://www.adafruit.com/product/5530","description":"Nice add on. 20mm seems to still fit comfortably.","quantity":"1","featured":false}},{"element_type":"text","content":"\n        \u003ch1\u003eProgram your device\u003c/h1\u003e\n\u003cp\u003eTo get your RP2040 macropad to act as a media controller, it needs to:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003edetect keypresses and changes in the knob position\u003c/li\u003e\n\u003cli\u003esend out corresponding keyboard messages to the attached USB host device (ex: a phone).\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eMy own implementation for this \"media hub\" is written for Adafruit's CircuitPython, and can be found here:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e💾\u0026nbsp;\u003ca href=\"https://github.com/alainman-krh/Projects_Circuits/blob/main/projects/MediaController/README.md\" target=\"_blank\"\u003eMediaController project README\u003c/a\u003e (see MediaHub_AFMacropad). 🚀 \u003ca href=\"https://github.com/alainman-krh/Projects_Circuits/blob/main/projects/MediaController/1-INSTALL.md\" target=\"_blank\"\u003eInstallation instructions\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n      ","metadata":{}},{"element_type":"alert","content":"\u003cp\u003eOther makers have microcontroller projects that do something very similar. Feel free to start from one of those if you prefer - or even write your own from scratch.\u003c/p\u003e","metadata":{"class":"element alert-element build-alert alert-info","markdown":"Other makers have microcontroller projects that do something very similar. Feel free to start from one of those if you prefer - or even write your own from scratch.","alert_type":"info"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch1\u003eBare-bones solution\u003c/h1\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/631/original/MediaHub_Simple-small.jpg?1739634314","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eOnce your macropad is programmed (see above), the simplest solution is to connect it directly your phone (or PC, Mac, etc).\u003c/p\u003e\n\u003cp\u003ePressing the keypad buttons will emulate pressing keyboard keys, and send them out to the USB host (attached phone). Similarly, turning the\u0026nbsp;volume knob causes the microcontroller to send out a series of volume up/down keypresses as well.\u003c/p\u003e\n\u003cp\u003eBy pairing your phone to Bluetooth® speakers, you will get more responsive (hopefully) control over the volume.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"alert","content":"\u003cp\u003eSome Bluetooth® speakers implement something called \"absolute volume control\". This typically keeps the speaker volume in sync with your phone volume (though not always). Those speakers might result in a more pleasant experience given there should only be one volume levels to manage (not 2). Absolute volume control also has the potential to mitigate speaker hiss at lower listening levels.\u003c/p\u003e","metadata":{"class":"element alert-element build-alert alert-info","markdown":"Some Bluetooth® speakers implement something called \"absolute volume control\". This typically keeps the speaker volume in sync with your phone volume (though not always). Those speakers might result in a more pleasant experience given there should only be one volume levels to manage (not 2). Absolute volume control also has the potential to mitigate speaker hiss at lower listening levels.","alert_type":"info"}},{"element_type":"alert","content":"\u003cp\u003eA speaker with \"absolute volume control\" will typically cause a paired phone's volume indicator bar to move/update in response to changing the volume directly on the speaker.\u003c/p\u003e","metadata":{"class":"element alert-element build-alert alert-info","markdown":"A speaker with \"absolute volume control\" will typically cause a paired phone's volume indicator bar to move/update in response to changing the volume directly on the speaker.","alert_type":"info"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch1\u003eDirect-pair solution\u003c/h1\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/632/original/MediaHub-SimpleHub.png?1739635658","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n        \u003cp\u003eThe next step up is to include a Bluetooth® audio transmitter like \u003ca href=\"https://us.creative.com/p/accessories/creative-bt-w3x\" target=\"_blank\"\u003ethis one from Creative labs\u003c/a\u003e. The advantage of this setup is that you can keep the audio transmitter \"permanently\" paired with your favourite (nearby) speakers so that connecting a single USB cable immediately turns your phone+macropad into a media controller for your listening room.\u003c/p\u003e\n\u003cp\u003eNote that audio transmitters are typically designed for PCs/Macs - and so you might need to establish the transmitter/speaker pairing using software on a PC/Mac before it can be used with your phone.\u003c/p\u003e\n\u003cp\u003eThis setup also requires a USB hub/dock \u003ca href=\"https://plugable.com/products/usbc-7in1\" target=\"_blank\"\u003elike this one from Plugable\u003c/a\u003e now that 2 USB devices (audio transmitter + macropad) need to simultaneously connect to your phone.\u003c/p\u003e\n\u003ch2\u003eExample hardware (optional)\u003c/h2\u003e\n      \n\n\n\n","metadata":{}},{"element_type":"parts","content":"\n  \u003cdiv class=\"parts-details\"\u003e\n    \u003cdiv\u003e\n      \u003cspan class=\"parts-quantity\"\u003e1\u003c/span\u003e\u003cspan\u003e x \u003c/span\u003e\n        \u003ca href=\"https://us.creative.com/p/accessories/creative-bt-w3x\" class=\"parts-name\" target=\"_blank\"\u003eCreative BT-W3X\u003c/a\u003e\n      \u003cdiv class=\"parts-description\"\u003eBluetooth® audio transmitter\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"parts-action\"\u003e\n  \u003cdiv\u003e\n      \u003ca href=\"https://us.creative.com/p/accessories/creative-bt-w3x\" class=\"parts-url btn-primary\" target=\"_blank\"\u003eBuy Now\u003c/a\u003e\n\n  \u003c/div\u003e\n\u003c/div\u003e\n\n  \u003cdiv class=\"clearfix\"\u003e\u003c/div\u003e\n","metadata":{"name":"Creative BT-W3X","url":"https://us.creative.com/p/accessories/creative-bt-w3x","description":"Bluetooth® audio transmitter","quantity":"1"}},{"element_type":"parts","content":"\n  \u003cdiv class=\"parts-details\"\u003e\n    \u003cdiv\u003e\n      \u003cspan class=\"parts-quantity\"\u003e1\u003c/span\u003e\u003cspan\u003e x \u003c/span\u003e\n        \u003ca href=\"https://plugable.com/products/usbc-7in1\" class=\"parts-name\" target=\"_blank\"\u003ePlugable USB-C 7-in-1 Hub\u003c/a\u003e\n      \u003cdiv class=\"parts-description\"\u003e3 USB / no ethernet\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"parts-action\"\u003e\n  \u003cdiv\u003e\n      \u003ca href=\"https://plugable.com/products/usbc-7in1\" class=\"parts-url btn-primary\" target=\"_blank\"\u003eBuy Now\u003c/a\u003e\n\n  \u003c/div\u003e\n\u003c/div\u003e\n\n  \u003cdiv class=\"clearfix\"\u003e\u003c/div\u003e\n","metadata":{"name":"Plugable USB-C 7-in-1 Hub","url":"https://plugable.com/products/usbc-7in1","description":"3 USB / no ethernet","quantity":"1"}},{"element_type":"parts","content":"\n  \u003cdiv class=\"parts-details\"\u003e\n    \u003cdiv\u003e\n      \u003cspan class=\"parts-quantity\"\u003e1\u003c/span\u003e\u003cspan\u003e x \u003c/span\u003e\n        \u003ca href=\"https://plugable.com/products/usbc-7in1e\" class=\"parts-name\" target=\"_blank\"\u003ePlugable USB-C 7-in-1 Hub (+ethernet)\u003c/a\u003e\n      \u003cdiv class=\"parts-description\"\u003e2 USB / with ethernet jack\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"parts-action\"\u003e\n  \u003cdiv\u003e\n      \u003ca href=\"https://plugable.com/products/usbc-7in1e\" class=\"parts-url btn-primary\" target=\"_blank\"\u003eBuy Now\u003c/a\u003e\n\n  \u003c/div\u003e\n\u003c/div\u003e\n\n  \u003cdiv class=\"clearfix\"\u003e\u003c/div\u003e\n","metadata":{"name":"Plugable USB-C 7-in-1 Hub (+ethernet)","url":"https://plugable.com/products/usbc-7in1e","description":"2 USB / with ethernet jack","quantity":"1"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch1\u003eComplete media station\u003c/h1\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/633/original/MediaHub-ConnectedHub.png?1739637022","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eIf you are looking for a more complete setup, a well selected USB-C hub/dock can turn your phone into a much better connected \"media station\".\u003c/p\u003e\n\u003cp\u003eTo build on the direct-pair solution (section above), I personally suggest using a Bluetooth® audio transmitter as a central component to the media station.\u003c/p\u003e\n\u003cp\u003eAdditionally, you can leverage your USB hub's built-in connections like Ethernet, and HDMI out:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eWiring up your media station with Ethernet/RJ45 is great in areas where WiFi is less reliable.\u003c/li\u003e\n\u003cli\u003eSending HDMI to your living room TV can make it easier to watch videos and share recent pictures with others.\u003c/li\u003e\n\u003c/ul\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"alert","content":"\u003cp\u003eMost USB-C hubs/docks support \"DP Alt Mode\" for their HDMI outputs. USB-C alt mode is becoming more popular, but many phone models do not support it at the time of writing. Some other phones support a technology called DisplayLink. You might have to do some research (or do your own testing) to see what your phone supports.\u003c/p\u003e","metadata":{"class":"element alert-element build-alert alert-warning","markdown":"Most USB-C hubs/docks support \"DP Alt Mode\" for their HDMI outputs. USB-C alt mode is becoming more popular, but many phone models do not support it at the time of writing. Some other phones support a technology called DisplayLink. You might have to do some research (or do your own testing) to see what your phone supports.","alert_type":"warning"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eFinally, many USB-C hubs support power delivery to charge up your phone while it is connected. Surely a bonus for some setups.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"parts","content":"\n  \u003cdiv class=\"parts-details\"\u003e\n    \u003cdiv\u003e\n      \u003cspan class=\"parts-quantity\"\u003e1\u003c/span\u003e\u003cspan\u003e x \u003c/span\u003e\n        \u003ca href=\"https://us.creative.com/p/accessories/creative-bt-w3x\" class=\"parts-name\" target=\"_blank\"\u003eCreative BT-W3X\u003c/a\u003e\n      \u003cdiv class=\"parts-description\"\u003eBluetooth® audio transmitter\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"parts-action\"\u003e\n  \u003cdiv\u003e\n      \u003ca href=\"https://us.creative.com/p/accessories/creative-bt-w3x\" class=\"parts-url btn-primary\" target=\"_blank\"\u003eBuy Now\u003c/a\u003e\n\n  \u003c/div\u003e\n\u003c/div\u003e\n\n  \u003cdiv class=\"clearfix\"\u003e\u003c/div\u003e\n","metadata":{"name":"Creative BT-W3X","url":"https://us.creative.com/p/accessories/creative-bt-w3x","description":"Bluetooth® audio transmitter","quantity":"1"}},{"element_type":"parts","content":"\n  \u003cdiv class=\"parts-details\"\u003e\n    \u003cdiv\u003e\n      \u003cspan class=\"parts-quantity\"\u003e1\u003c/span\u003e\u003cspan\u003e x \u003c/span\u003e\n        \u003ca href=\"https://plugable.com/products/usbc-7in1e\" class=\"parts-name\" target=\"_blank\"\u003ePlugable USB-C 7-in-1 Hub (+ethernet)\u003c/a\u003e\n      \u003cdiv class=\"parts-description\"\u003e2 USB / with ethernet jack\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n  \u003cdiv class=\"parts-action\"\u003e\n  \u003cdiv\u003e\n      \u003ca href=\"https://plugable.com/products/usbc-7in1e\" class=\"parts-url btn-primary\" target=\"_blank\"\u003eBuy Now\u003c/a\u003e\n\n  \u003c/div\u003e\n\u003c/div\u003e\n\n  \u003cdiv class=\"clearfix\"\u003e\u003c/div\u003e\n","metadata":{"name":"Plugable USB-C 7-in-1 Hub (+ethernet)","url":"https://plugable.com/products/usbc-7in1e","description":"2 USB / with ethernet jack","quantity":"1"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch1\u003eOptional enhancements\u003c/h1\u003e\n\u003ch2\u003eSimple enclosure\u003c/h2\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/634/original/MediaHub_Box-small.jpg?1739638483","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n        \u003cp\u003eTo hide all the cabling of the \"media hub\", you can search for enclosures called \"cable management boxes\". Some are made of plastic, some made from wood. I don't suggest getting metal boxes if you are planning to use your media hub with Bluetooth® speakers. Metal impairs wireless signals.\u003c/p\u003e\n\u003cp\u003eI personally found wooden boxes give a project a more solid feel (pleasant to use). You can even build your own if you don't like the available options.\u003c/p\u003e\n\u003ch2\u003eDisable USB drive\u003c/h2\u003e\n\u003cp\u003eBy default, CircuitPython automatically mounts microcontrollers like the RP2040 Macropad as a USB drive. This can be a bit confusing/irritating to users that don't expect a drive to show up when connecting to a media controller.\u003c/p\u003e\n\u003cp\u003eTo circumvent this auto-mount behaviour, CircuitPython provides the \u003ccode\u003estorage.disable_usb_drive()\u003c/code\u003e command, which should be added to the microcontroller \u003cstrong\u003eboot.py\u003c/strong\u003e\u0026nbsp;file. For more information, see:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003ca href=\"https://learn.adafruit.com/customizing-usb-devices-in-circuitpython/circuitpy-midi-serial\" target=\"_blank\"\u003eCustomizing USB Devices in CircuitPython\u003c/a\u003e (Section: CIRCUITPY Mass Storage Device)\u003c/li\u003e\n\u003cli\u003eYou might also want to check out section \"Don't Lock Yourself Out!\" (further below).\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eIn his learn guide, Dan Halbert explains how you can re-enable the USB mount using a button press or by forcing the board to start in safe mode. Another alternative is to connect to the device using a serial terminal, switch over to CircuitPython's REPL mode, and run a command to rename/delete the \u003cstrong\u003eboot.py\u003c/strong\u003e file.\u003c/p\u003e\n\u003cp\u003eAn example \u003cstrong\u003eboot.py\u003c/strong\u003e file is provided \u003ca href=\"https://github.com/alainman-krh/Projects_Circuits/blob/main/MediaController/pkg_install/MediaHub_AFMacropad/boot.py_ignorefornow\" target=\"_blank\"\u003ehere (renamed to avoid accidental activation)\u003c/a\u003e.\u003c/p\u003e\n\u003ch2\u003eOptional IR receiver\u003c/h2\u003e\n\u003cp\u003eOn the side of the RP2040 macropad is a STEMMA-QT port (4-pin JST-SH) available for some additional expansion. Using this port, it is relatively straightforward to expand your media hub to support control through IR remote as well.\u003c/p\u003e\n\u003cp\u003eSimply connect an \u003ca href=\"https://www.adafruit.com/product/5939\" target=\"_blank\"\u003eIR receiver module (#5939)\u003c/a\u003e as described in the \"Pico-Swirly-5939\" section of the note called \"\u003ca href=\"https://adafruit-playground.com/u/Alain_ManHW/pages/build-patterns-ir-receiver-variants\" target=\"_blank\"\u003eBuild patterns: IR receiver variants\u003c/a\u003e\". The code to activate the IR receiver is already present in the sample code for this project (see section: Program your device). It just needs to be activated (set \u003ccode\u003eENABLE_IR = True\u003c/code\u003e).\u003c/p\u003e\n      \n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch1\u003eAdditional resources\u003c/h1\u003e\n\u003ch2\u003eLearn guides\u003c/h2\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"guide","content":"https://learn.adafruit.com/adafruit-macropad-rp2040/macropad-assembly","metadata":{"guide_id":"3366","page_id":"22673"}},{"element_type":"guide","content":"https://learn.adafruit.com/customizing-usb-devices-in-circuitpython/circuitpy-midi-serial","metadata":{"guide_id":"3334","page_id":"22294"}}]