Raspberry Pi Pico - DIY Macro Keyboard
Using the all new Raspberry Pi Pico to create an DIY Macro Keyboard much like a stream deck with a few tactile switches and circuit python. thanks for the view!
○○○ LINKS ○○○
Circuit Python ► circuitpython.org
Microcenter RPi Pico ► micro.center/aax
Raspberry Pi Pico ► pico.raspberry...
○○○ SHOP ○○○
Novaspirit Shop ► teespring.com/...
Amazon Store ► amzn.to/2AYs3dI
○○○ SUPPORT ○○○
💗 Patreon ► goo.gl/xpgbzB
○○○ SOCIAL ○○○
🎮 Twitch ► / novaspirit
🎮 Pandemic Playground ► / @pandemicplayground
▶️ novaspirit tv ► goo.gl/uokXYr
🎮 Novaspirit Gaming ► / @novaspiritgaming
🐤 Twitter ► / novaspirittech
👾 Discord chat ► / discord
FB Group Novaspirit ► / novasspirittech
○○○ Send Me Stuff ○○○
Don Hui
PO BOX 765
Farmingville, NY 11738
○○○ Music ○○○
From Epidemic Sounds
patreon @ / novaspirittech
Tweet me: @ / novaspirittech
facebook: @ / novaspirittech
Instagram @ / novaspirittech
DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission.
Пікірлер: 225
You are a programming GOD! You taught an old guy like me a new trick. (I am 50 yrs old and new to the world of programming). I have watched tens of videos and could never follow them. You made it easy. THANK YOU! I am so excited! I think I understand how I can build a game controller out of this. (I am trying to build a hand held raspberry pi retro game emulator)
I always say, the best teachers are ones that help you understand AND inspire you to do
This was a great tutorial! After watching this, inspired by your code the same evening I made my own pico streamdeck using the pico explorer as it already has buttons and a screen built in. Currently it switches screens on OBS and Mutes and Unmutes, but next i am going to add a rotary dialler to switch modes for different apps such as zoom, youtube (going to create a skip advert macrokey) and others. Keep the vids coming, they are excellent!
@devendrakanade218
2 жыл бұрын
Can you share code
Great video, I'm so used to cutting and pasteing other peoples code and trying to make it fit/work without the benefit of understanding it! Will be following.
I loved this video. It's really helpful and educational to have someone run through the code as they are typing and assembling the hardware. I'm a real fan of this style of video. Great work.
@ShadowMKII
3 жыл бұрын
Same here. An awesome way to teach while simultaneously being inspiring. A good video indeed.
Nice pico/ CircuitPython intro. I’m following these, ThanX
I have spent three days playing with this idea, I have followed so many examples and totally failed to understand what was going on. I got some things working but no idea how! I wanted, almost exactly what you have done, For example, Press a key, get CONTROL F10..... So I finally gave up and sulked for a day. Came here and now it is PARTY TIME. Thank You, you have save me from "throwing my toys out of the pram" (loosing it). Now I have the basics of what I need, better still, I actually know why it works and can move on to greater things. I wish I had done this three days ago. THANKS!!!!!
Really nice implementation of the pico. It would be cool if u could assemble all this into a 3d printed case and compare it with a stream deck 😀
Thank you! Was struggling to figure out how to send key presses. I tried to solve this using MicroPython, but when I switched to CircuitPython, installed libraries, and ran this code, I was finally able to make a push button command that I wanted. Thank you again! Subscribed!
You have made the clearest, concise, presentation of how to accomplish this. After many many videos, I now have an understanding of the programming. Thank you.
Loving this format, well done
This is a nice format to see practical applications for programming with Pi devices. Thank you.
This what i looking for. It's help me a lot. I see so many DIY macro keyboard videos, but they don't explain how it works.
Would love to see the Pico in a custom mechanical keyboard! Maybe with a PCB designed specifically for it!
@apkiller10
3 жыл бұрын
with not cheap platics keys. no analog split & none industry stardard.
@ErickBuildsStuff
3 жыл бұрын
I'm on a process of repurposing mechanical keyboard having defective microcontroller. Couldn't find the usb Controller replacement so just reverse engineering the traces and using a pico as brains. Have to tweak the code a bit.
@sammie9675
2 жыл бұрын
Zack Freedman made one recently. kzread.info/dash/bejne/eJtkuJeGYM_Skag.html Edit: it’s not an official one but it uses the same chip so close enough
@juliohoyos3936
2 жыл бұрын
and how about antighosting? or when i press W in a game, my character move like bumping the W no constant
@md.farhadalam4912
2 жыл бұрын
Ya that's what I was about to tell. As you told I just liked your comment.
Awesome. You should do some kind of remote control with the esp8266 or esp32.
Dude this is awesome, i like this arrangement where you code with explanation, i would like to see more of these videos in the future.
You should have 8 pins and use binary and assign numbers And letters to specific inputs. Make sure you space the codes because they will stack otherwise.
Great video, as usual. More material like this is good. UP or DOWN are the internal pull up or pull down resistor. It not, you need to add another external resistor. Tip. Prefer to us read for positive and black for ground, and any other colours for other signals. Less likely to do errors when doing connections and finding faults.
@NovaspiritTech
3 жыл бұрын
I agree haha I need to find more wires.
I'm loving everyone making pico videos! I have 3 pre-ordered for end of this month :○
Very handy, I could see myself building a mini keyboard this way with specific key combos or one that is just there to enter the UEFI or change GRUB's selection when booting up a headless machine like my DIY-NAS.
Applied some of the code to make a full on working keyboard! Works very well just had to make a few adjustments, change the if to if else statements and write the script in a way that I didn't have to say all that for every key haha. Thank you so much for this, it helped so much!!
Thanks I like this new Pico. I am using Circuitpython on it so thanks for showing how to use it with the Pico. I like the way you explain things its easy to understand. Keep up the good work
Thanks for the video. Neat you can set it to a pullup or pulldown.
I've just used this to make a 3-button macro-keyboard for Copy / Paste / Paste-Special. Great tutorial. Going to get some nicer buttons and make a desktop box for it.
i'm having issues with the circuitpy opening as a mass storage device even after i code it all and it works and i can unplug it and it stills works everytime i plug it back in it opens as a mass storage device great tutorial thanks heaps.
Great Video Got me making my first Keypad!
Thank You!!!!!! This was a awesome tutorial! Subscribed!
thank you so much bro it really helped me 🔥🔥🔥🔥🔥🔥🔥
I'll probably make a full scaled up version of this project this year, thanks :D This was very helpful guide! Infact this was my first Pico video after its unboxing
ur the best all the other tutorial where using some other button i didnt have and they were confusing this one was too but after u understand this it actually makes sense thank you for making this tutorial
Nice. Just getting into new projects for my Pico. I think I will give this a try. Thanks for today’s video And yes I would love to see small easy to do projects. One I’m interested in is a simple power relay that I can used to turn on or off a 12V fan on my service bench. Code to use a PIR Motion IR Sensor that triggers a relay.
13:22 "We're not about that life right now" is what I will tell people who chirp on my code when it ultimately still works.
Great job, Don!
I really like the format. Please continue with more like this. Also, you need a 3d printer to play with to make custom keyboards!
very cool. would love to see some videos using the C environment instead of the micropython. Thanks!
Awesome. A good second revision of your code will be to debounce all buttons and use interrupts instead of listening for inputs in a while loop
Cool stuff. This reminded me an old project of mine. I used some TSOP IR receiver and Atmega 32U4 based board. I made a little program in C++ where I was able to send keys to my PC using a TV remote.
Great video tutorial, I would love to see more like this, I could eventually build hardware and customize my keys for Davinci Resolve, amazing
@NovaspiritTech
3 жыл бұрын
Thanks what my plan is with resolve!!!
@bern047
3 жыл бұрын
@@NovaspiritTech Amazing can't wait
A bit not experienced code from Raspberry. I personally expected that when I set btn.pull value, this will automatically affect btn.value and set it to true each time a voltage is changed from the default. A custom function read(btn) will help for sure.
You should create a class for button, to avoid copy and paste every stuff at the beginning, nice work, love your videos!
@NovaspiritTech
3 жыл бұрын
100% agree, but that is a whole new lesson to explain for people who are new to this programming stuff. I do want to touch on that later cause in the long run classes and functions are important
You're very good at explaining things!
Love this series please continue more
The fast processor may enable very low debounce times, unlike the ATMega32u4, though I'm not sure there's an open-source algorithm for that yet. I'd really like to see how responsive of a keyboard you can turn this Pi Pico into. Looking forward to a custom keyboard with a Pi Pico inside!
@jyvben1520
Жыл бұрын
Adafruit has a debounce function, from adafruit_debouncer import Debouncer see their learn guide
good content, bromigo :) The explanations on the side of why you are doing something are what most people need.
@NovaspiritTech
3 жыл бұрын
Haha I figured if you give a man a fish he can live for a day.. but if you teach a man to fish..... You know the rest
Great video Don im ordering a pico next week gonna try an follow this. Thanks
Thank you!
As a gamer, I can say there's finally a reason to buy this lil succer.
if i wanted to add an analog style wheel ( for scrubbing video, for example or similar to a wheel on a mouse), what would be the best way of approaching this? thanks for the video - I have been hunting for a usable gateway project for the pico - this is great.
@NovaspiritTech
3 жыл бұрын
Im have the same idea to help with scrubbing footage in resolve.
@bluetrousers1
3 жыл бұрын
@@NovaspiritTech - that's exactly what i was thinking! Thanks for replying.
@JohnPMiller
3 жыл бұрын
Rather than an analog-style wheel (potentiometer?), I think you want a rotary incremental encoder. This will give you the direction of the wheel and the number of clicks (which you can count and scale). Then you can translate these to key presses. A quick Google search will help you find them in your country. Some rotary incremental encoders come with momentary push switches. I bet this could be useful to you too. Let us know how it turns out.
For more buttons, virtually unlimited, learn how to play with 74hc595 shift registers 😉
the power icon was a mind blowing thing to be honesto
How about a switch matrix for a custom 80 something key board? What If I want to set it up to reference a text file stored on the Pi for key mapping? So I can change the mapping by just editing a text file.
@Marc_Wolfe
3 жыл бұрын
A text file as simple as the "raw data" tab this sight uses. www.keyboard-layout-editor.com/#/
@Marc_Wolfe
3 жыл бұрын
Subscribed incase it becomes a video, would love to know more. My last custom keyboard happened to be close to a Preonic, so I just used something called "easy AVR" to flash it(it had a preonic preset).
super cool and great project's ideas !
this is awesome!!! i been wanting to make a macro for a while and this kinda pushed me to do it. my next step is to try your auto-clicker =]
Thanks!
You think you could integrate the pico with the SparkFun VR IMU Breakout - BNO080 ? I picked up a small Arduino board and a IMU but I'm much comfortable with python then whatever Arduino uses.
15:00 Do we need diodes here? I don't know much about electronic circuits, but often there are diodes in custom macrokeyboards
Love it keep feeding my Brain! I have a unique Idea, well not completely unique but a new mouse trap Idea.
So I made a three button keyboard for a CNC PC controller (Run, Pause, Stop). It is an old Windows XP computer (used because of parallel port and does not need to be fast). The issue I am having is my windows 11 computer works fine with it but when I connect it to the windows XP computer it wants to install a driver. Is there a driver available for this?
I made 8 switches that common grounded by pairs (4 columns) so it is common ground, and when i press for example 1st switch on GP0, nothig happens, also tried Pull.UP and 3V3 instead of GND, still wont work edit: I FOUND OUT WHY! i used 3V3 and GP pin, but when I checked button soldering, button, which i used to check macropad just desoldered I dont know why, but my copper soldering just "disintegrates", and this is the case i solder at 330-350 C with lead based solder
Very well explained. Thanks
So you could just create a macro board with a Raspberry Pi and some Python … I love in what glorious technology we have!
I’m very new to this scene of PCs. I play Star Citizen a lot and my goal with this is to make a macro board to retract my landing gear, target, etc. You mentioned powering an LED along with the button BUT my question is: is it possible to set it up to where I press the button and the LED stays on until I press the key again? (Landing gear up, light on, target locked, light on, etc etc) thank you for such a great and easy to follow video!!🙏🙏
@SteveGoodenough
2 жыл бұрын
If you make the led run off another gpio pin then yes you could but you have to turn the led on/off yourself in code and use some variable to indicate if it's on/off something like (not real code here) if key pressed: # do all the keyboard stuff first landing_gear_up = not landing_gear_up # toggle the landing gear if landing_gear_up: # turn led on else: # turn led off or even do away with the if/else if the library allows you to toggle the led on/off
Thanks you !!! There is no way to make it copy and paste a text , right ?. The text included in the code.
Great job, but how can I do the same exact thing for an Android tablet instead of PC ?
Will my PC's Bios recognise it as a keyboard, ie will I be able to automate changing bios settings (over keyboard macro) with it? Do will most devices recognise it was USB keyboard or just OSes like Linus and Windows?
Hey Don, really interesting. I have a Pico but can't find any documentation for the various modules in micropython etc. You type all of that stuff out like it's second nature to you. I'm sure you are not guessing! Where is all that stuff?
@NovaspiritTech
3 жыл бұрын
I read the source codes to find the command like keyboard.press or keyboard.release
@johnnychristoffersen7453
3 жыл бұрын
@@NovaspiritTech Hahaha. The hard way. Thanks, my friend. Keep hacking!
@NovaspiritTech
3 жыл бұрын
Haha yeaaa... Check out the git for adafruit_circuitpython_bundle it has way more cool stuff and examples
Superb
Can you make split keyboard using that ? And what if i want to use more than 28 button ?
well this will be fun, now I can make a giant button matrix
That's great....but how do you set up the macro to do a sequence of buttons with times in between each sequence? For example, if I wanted a macro to press S, D+S, D+H in a sequence that will result in a Hadouken for Street Fighter V, what are the intruction codes for sequential instead of simultaneous?
This is a great video. Thanks!
How should I proceed if instead of keyboard shortcuts, I wanted to send an entire sentence as soon as I press the button?
good stuff, dude! I appreciate your explanations using hyposthiticals like 'if we typed this instead, you'd get...'
@NovaspiritTech
3 жыл бұрын
i think understanding what your doing is more important then just doing it. It will help grow more makers
THANK YOU SO MUCH THIS IS AWESOME CONTENT!!!!!!!! Could you do a key matrix (with rows and columns) keyboard setup with the pico? You are a very good teacher it is much appreciated!
@jyvben1520
Жыл бұрын
chris dehut has done it recently
Can you do an update on this video and show us/me how to add a rotary encoder to this to scroll through a menu of key outputs
Really nice tutorial, there are many tutorials but none of them were clear like this. Thanks for the great content. I have one question If we push two keys at same time, will both of them will result in output or just one of them, Can you program a diy arcade controller with 8 way joystick and 8 push buttons using pico.
Something I've been trying to find out but not sure how to find the answer: How do people "clean up" their breadboard projects? Do people build cases around it (to hide wires and such) or just move onto making a custom PCB and 3D print a case?
Would love to see if this can be used for handwired keyboard using pico!
That's wonderful! Great video! Would it be difficult to implement the code to use combinations of keys to write out entire words like a steno machine?
Thank you for this. I'm trying to do this project in the Raspberry PI 4, but it's not working. Is it possible?
I'm looking for creating a macro keyboard now for a while, but didn't have the time to deeply dive into it - where's the difference between using the pico and the script you used as to using a digispark? for a macro keyboard with only 3 keys...
Love it thanks. Cheers, JAYTEE
Is there a way to make your own custom keycodes that the pc will recognize? Sorta how when you press your left mouse button it says “MOUSE1” usually. Example: im trying to make my own foot pedal switches and it would be nice if I didn’t have to create specific keyboard shortcuts for what I want to use them for, and then assign each pedal to said keybind (like making a pedal say ‘Alt+Tab’). Is there a way to just make it say “PEDAL1”, “PEDAL2” etc?
@jyvben1520
Жыл бұрын
so sending text, which are just are series of keycodes, (usb hid could have exotic options for pedals) (maybe try to find usb hid viewer for your system to see what is really received from a bought pedal ) see no problem in using several keyboard.press(...) statements in the one if block .... better have a function that receives random text and sends them out would be large but doable (as each letter has to be converted to keycode and if uppercase a shift must be added), one word only then if only the number changes then that function could already have "PEDAL" and just needs to receive the number as text ...
you made my day my man. I have a question. how about if we use a WIFI module, can we make it wireless?
I have the problem that the HID Keyboard of the Pico is not "quite" a proper Keyboard. In Active apps I can use it no problem, but with OBS Studio it *only* sends the Keys when OBS is in front/focus. A second (normal) keyboard just works fine in that regard. I have no idea why windows is taking the Pico in a different way, maybe some security thing?
nice love to see more pls...
Hi, really a great job. Do you think is possible to use a touch LCD instead micro switch? Just like the Elgato stream deck. Thank you
i had to watch this to add buttons to open auto pro, but i still wish you'd make a tutorial for that
Can I have the following shortcuts on a loop? control + tab (to change to the next tab), command + R (to refresh the tab) 😏
Thanks so much! This was really useful! Does this work out with mechanical switch breakouts btw??
Can we program it and open apps like Reddit, Twitter and Discord?
@RastaManPower
3 жыл бұрын
Yeah for sure you can but i am not sur ehow. Id be imterested to know
@PileofKyle
3 жыл бұрын
Ya you can use it in conjunction with event ghost (eventghost.net)
Good video, very helpful, how would you do with a variable resistor and send keys to a flight similar game like IL2? For throttle control for example.
hi, thanks to you i made my first macro pad with the pico (already did it before with arduino) and was very very easy, also posted on my github the code for it, if it's fine for you i can share it here!
Enjoying these pico videos. I made a zoom mute button a few months back with the adafruit Trinket. Are you aware of a way for the button to "know" the mute status in the zoom (or other) app, so that its not simply a toggle, but actually knows if it's muting or unmuting? Seems it would need a counterpart script on the computer, but I'm still new to all this.
can we use any momentary switch?
Looks cool! but not much would use that keyboard 😂😂
@reyanshkhobragade5822
3 жыл бұрын
@moon_1789 woah woah control yourself
@aminghafoori6496
3 жыл бұрын
these hot key keyboards are so so good give them a try they are so handy
@badgerbalti
3 жыл бұрын
Plenty of uses automating tasks or creating custom control surfaces. Coupled with other input types it can work well with Video or Photo editing software, giving direct access to tools and modifiers.
Is there a way to disable/hide mass storage feature on circuitpython? I don't want my PC to detect a drive each time when I plug in my macro keyboard.
Would love to see this same project but with the buttons sending MIDI notes.
Love these projects with coding. More Please
Start a github? With schematic, code, etc