No matter how many keys you have on your keyboard, you can still use a dedicated keyboard with buttons to run macros, launch your favorite apps, or, if you’re a streamer, launch functions in OBS. Many users swear by the Elgato Stream Deck line of macro keyboards, but these devices are expensive.
With Raspberry Pi Pico, inexpensive hardware and the right script, you can make your own Stream Deck type macro keyboard, plug it in via USB and use it to make your life in OBS or any task easier. When completed, the macro keyboard will be considered a USB keyboard by your operating system, allowing it to work with any computer, no special drivers or software required.
What You Need To Build A Pico-Powered Raspberry Pi Streaming Platform
- Raspberry Pi Pico
- Mechanical key switches (i.e. Cherry MX brown)
- Key caps (compatible with Cherry MX)
- 30 gauge wire
- 3D printed case (using this design)
Configuring the firmware of the Raspberry Pi Pico
To make our Raspberry Pi Pico powered stream platform work, we’ll be using Circuit Python as our programming language, as it has a built-in USB HID library. To use Circuit Python on a Pico, you must first flash the appropriate firmware.
1. Download the Python circuit UF2 file.
2. Press and hold BOOTSEL button and plug your Pico into the USB port from your Raspberry Pi or other computer. Release the BOOTSEL button once your Pico is connected.
This will mount the Pico as a mass storage device called “RPI-RP2”.
3. Copy UF2 file on the RPI-RP2 volume.
Your Pico should automatically restart and run Circuit Python.
Added code for the Pico-Powered streaming platform
I wrote custom code for the Pico to act as a read / macro keyboard. Here is how to install it.
1. Download the project zip file from Novaspirit Github.
2. Transfer the contents of the zip file to the “CIRCUITPY” volume and overwrite existing files.
3. Restart the Pico and it should load the macro key code.
3D Printing Pico-Powered Stream Deck Case
If you want to use our box, you need to 3D print it or have it printed by a service such as All3DP. Download our design files and use these CURA settings.
- 15% infill
- Wall thickness 3 lines
- No support needed
- 0.2 layer height (use 0.1 layer height for higher quality)
- Print separately with two different colors
Assembling Your Pico-Powered Streaming Platform
Now it’s time to assemble the stream deck / maco keyboard and solder everything in place.
1. Start by placing Cherry MX compatible key switches on the top plate of the 3D printed housing.
2. You connect the wires as follows. More details below.
3. Connect all pins on the top left on switches with a single wire and connect it to pin 36, pin 3V3 on the Pico.
4. Solder a short wire to each of the right pins prepare connections we are going to create individual GPIO pins.
5. Solder the required wires to the appropriate pins on the raspberry pi pico
5. Assemble the housing.
Macro key configuration
The keys are configured to use Ctrl + Function keys from button 1 (top left) Ctrl + F7 to button 6 (bottom right) Ctrl + F12. These keys can be changed from code.py if needed. But I’ll show you some ways to use the default mapping with the examples below for program and OBS shortcuts.
Configure a macro for program shortcuts
If you want to use a dongle on a Raspberry Pi Pico powered streaming platform to launch an app on Windows, here’s how.
1. right click on a shortcut and select “properties”.
2. Select the “Shortcut key” field in the Shortcut tab.
3. Press one of the macro keys and you will see its keyboard combo (ex: CTRL + F7 for key 1) appear in the box.
4. Press “OK” and your new macro has been assigned to the pressed key.
Configuring macros for OBS
1. Open OBS and go to “Settings”.
2. Select the “Keyboard shortcuts” parameter and scroll to the stage you want to assign a macro.
3. Select “Go to Stage” on the Stage you want macro and press the appropriate key on your delivery platform to assign it.
4. Press OK ” and the macro keys will be assigned to those scenes.