GithubHelp home page GithubHelp logo

pico-streamdeck's Introduction

Pico Producer

About this Project

This project is an OBS Controller using a Raspberry Pi Pico and CircuitPython.

Pico StreamDeck Build 1

In Action

Pico StreamDeck In Action

Featured

The Raspberry Pi Pico Producer has been featured in the following publications;

Basic Circuit

Pico StreamDeck Circuit

I've avoid GP15 as it's assigned a USB function... Using GP15 results in the following error at startup;

"ValueError: GP15 in use"

PCB

Front

Pico StreamDeck PCB Front

Back

Pico StreamDeck PCB Back

PCB

Pico StreamDeck PCB PCB

You can have your PCB made at OSH Park here;

https://oshpark.com/shared_projects/UNP0qi2U

Parts List

Part Qty Link
PCB 1 https://oshpark.com/shared_projects/UNP0qi2U
Cherry MX Keycaps 12 https://amzn.to/2Oo1nLP
3mm LED 12 https://amzn.to/3rAqNEV
220 Ohm 8x Isolated Resistor Pack 2 http://bit.ly/picoproducerresistorarray
Raspberry Pi Pico 1 http://bit.ly/pimoroni-pico
20 pin Male PCB Header 2 https://amzn.to/3sUr8lN
3D Printed Case 1 https://www.thingiverse.com/thing:4800253

Notes:

Case

We now have two different case designs....

Cliff Agius and his son have created a version of the box suited for buttons with holes for LEDs.

I've modified this design to add LEDs above each button;

Pico StreamDeck Case

It was originally based on this design;

https://www.thingiverse.com/thing:4186055

The keycaps are from here;

https://www.thingiverse.com/thing:4186055

You can find the project on Thingiverse here;

https://www.thingiverse.com/thing:4800253

Assembly Hints

  • Insert the 20 Pin PCB headers with the long legs away from the PCB towards the Pico (Otherwise it'll fowl the faceplate)
  • Solder the 2 Resistor Packs and the Pico PCB Headers first. Then the LEDs and Buttons. Then the Pico.
  • You'll need to trim the legs on the resistor packs which border the three left hand buttons.
  • Insert the LEDs into the PCB, then insert the Buttons into the faceplate and then insert that into the PCB.
  • Push the leds back through the PCB, so they poke into the holes in the faceplate, otherwise they'll be below the faceplate.
  • You'll need to trim the legs on the PCB headers otherwise it'll fowl the bottom of the case.

CircuitPython HID

You can find some more info about the CircuitPython KeyMappings here;

https://circuitpython.readthedocs.io/projects/hid/en/latest/_modules/adafruit_hid/keycode.html

Instructions

  • Plug in the Raspberry Pi Pico while holding the onboard button.
  • Your PC will mount the Pico as a drive
  • Copy the adafruit-circuitpython-raspberry_pi_pico-en_US-6.2.0-beta.1.uf2 file to the Pico
  • The Pico will reboot once it's done with CircuitPython onboard.
  • Copy the adafruit_hid folder and the code.py file to the Pico
  • In OBS setup Hotkeys for the different scenes by putting your cursor in the Hotkey Box and pressing a button...
Scene 1 =  ctrl + F1
Scene 2 =  ctrl + F2
Scene 3 =  ctrl + F3
Scene 4 =  ctrl + F4
Scene 5 =  ctrl + F5
Scene 6 =  ctrl + F6
Scene 7 =  ctrl + F7
Scene 8 =  ctrl + F8
Scene 9 =  ctrl + F9
Scene 10 =  ctrl + F10
Scene 11 =  ctrl + F11
Scene 12 =  ctrl + F12
  • Press the buttons to change scenes in OBS!
  • Each button will light a corresponding LED to show which Scene is currently active.

Debugging

Circuit Python creates a virtual COM port, so you can use a terminal Program set to 8N1 9600 Baud to debug the code... Just hit the enter key at teh prompt, and the terminal will echo there.

It might help to put a large enough delay at the start of your code to give you time to initialise the terminal.

Pico Debugging

Future Planning

  • Look at Bluetooth / WebSockets (Will need add on circuitary!)
  • Possible Matrix Input (But, I like the simplicity)
  • Possible Resistor Ladder Input (But, again, I like the simplicity)

Notes

The HID control code is based on a nice blog post by Hriday which shows how to get the Pico working as a HID device, emulating a keyboard;

https://hridaybarot.home.blog/2021/01/31/using-raspberry-pi-pico-has-hid-device-to-control-mouse-and-keyboard/

Thanks

Thanks to Cliff Agius and his son for the original 3d Files. Thanks to John Furcean for refactoring the code. Thanks to frankalicious for fixing some spelling checks.

pico-streamdeck's People

Contributors

frankalicious avatar jfurcean avatar pjgpetecodes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pico-streamdeck's Issues

Small gap between sections in "Pico Producer 1.5 - Case.stl"

My friend and I found a couple issues with the 3d print file while trying to build one of these.

One is that there is a small gap between the sections of the base that causes a 3d print slicer to want to insert lots of extra supports, since it thinks the top half is free-floating. We were able to manually fill that gap before printing.

Hotswappable key switches

It would be really nice if the solder points for the switches support solder pads for hot swap sockets. That way I can swap out switches that break or just switch to a different switch type without having to desolder and resoldering everything.

USB port hole is not aligned with Pico on "Pico Producer 1.5 - Case.stl"

Hi, My friend and I are working on building a couple of these thanks to the work you did here. We ran into a couple of issues with the 3d print of the case.

One is that the hole for the USB port is not aligned with the Pi Pico if you use the custom printed circuit board as ordered from OSHPark. I estimate that I had to remove about 2 mm of material to the left of the hole (when looking at it from the back), and 1.5 mm of material on the top edge of the hole. you may want to remove even more material, as some micro USB cables have thick boots on the end.

Shortcuts to OBS when not in focus?

Did you have also the problem that OBS does not receive the Keys when not in focus?

My Pico just sends fine keys to OBS, but once I stream/record and using a different app the Keys will not get through anymore.

With a (testcase) second USB keyboard and my old Arduino Mini based Streamdeck I have no problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.