Making a Streamdeck using 18F2550
🎛️ How to Build a USB Streamdeck Using PIC18F2550
Trigger Scenes, Automate Actions, and Take Control—One Button at a Time
In the world of streaming, productivity, and automation, a streamdeck is a powerful tool. But what if you could build your own—customized, compact, and coded from scratch? In this tutorial, we’ll walk through how to create a USB streamdeck using the PIC18F2550 microcontroller, four tactile switches, and a sprinkle of Python magic.
Whether you’re switching OBS scenes, launching macros, or triggering shortcuts, this DIY streamdeck gives you full control.
🧰 Gather all the Materials Required
- PIC18F2550 USB Development Board (with bootloader)
- 4x Push Buttons (momentary tactile switches)
- 4x Pull-Down Resistors (10kΩ recommended)
- Breadboard or perfboard
- Jumper wires
- Host PC with Python installed
- MPLAB X IDE + XC8 Compiler
- USB cable
🔧 Step 1: Build the Circuit
We’ll wire four buttons to the PIC18F2550’s I/O pins:
| Button | PIC Pin | Port | Pull-Down Resistor |
|---|---|---|---|
| BTN1 | RC0 | PORTC | 10kΩ to GND |
| BTN2 | RC1 | PORTC | 10kΩ to GND |
| BTN3 | RA5 | PORTA | 10kΩ to GND |
| BTN4 | RA4 | PORTA | 10kΩ to GND |

Wiring Notes:
- Connect one leg of each switch to the respective PIC pin.
- Connect the other leg to Vcc.
- Add a pull-down resistor between each PIC pin and GND.
- Ensure the PIC board is powered via USB.
This configuration ensures each button reads HIGH when pressed and LOW when idle.
💻 Step 2: Compile and Load Firmware
Using MPLAB X IDE and the XC8 compiler:
- Write firmware to detect button presses and send USB HID reports.
- Configure USB descriptors to emulate a HID device (like a keyboard).
- Compile the code and generate a
.hexfile. - Load the
.hexfile using the bootloader.

The source code can be downloaded here https://efcomputer.net.au/blog/product/beepic-18f2550-streamdeck/
🐍 Step 3: Run Python Listener on Host PC
On your PC, run a Python script that listens for USB HID input and maps each button to a key sequence or macro.
Here is the snippet of the Python code:

The python host program code can be downloaded here https://efcomputer.net.au/blog/product/python-host-program-for-beepic-18f2550-streamdeck/
🎬 Step 4: Trigger Automation
Now the fun begins. Each button can be mapped to:
- 🎥 Switch scenes in OBS
- 🎙️ Toggle microphone mute
- 🖥️ Launch applications
- 📁 Open folders or URLs
- 🔁 Run scripts or macros
This transforms your PIC-powered streamdeck into a productivity powerhouse. You watch the final product in the following video
Final Thoughts
Building a streamdeck with the PIC18F2550 isn’t just a technical exercise—it’s a gateway to understanding USB HID, embedded firmware, and host-device interaction. With just four buttons, you unlock endless possibilities for automation, control, and customization.
So go ahead—press that button. Your next scene, shortcut, or script is just one click away.