Raspberry Pi Pico - DIY Macro Keyboard
Вставка
- Опубліковано 11 лют 2021
- 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.raspberrypi.org
○○○ SHOP ○○○
Novaspirit Shop ► teespring.com/stores/novaspir...
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. - Наука та технологія
I always say, the best teachers are ones that help you understand AND inspire you to do
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.
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!
Can you share code
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.
Same here. An awesome way to teach while simultaneously being inspiring. A good video indeed.
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.
This is a nice format to see practical applications for programming with Pi devices. Thank you.
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.
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
Loving this format, well done
Nice pico/ CircuitPython intro. I’m following these, ThanX
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!
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!!
I'm loving everyone making pico videos! I have 3 pre-ordered for end of this month :○
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.
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
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!!!!!
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.
I really like the format. Please continue with more like this. Also, you need a 3d printer to play with to make custom keyboards!
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
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.
Awesome. You should do some kind of remote control with the esp8266 or esp32.
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.
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.
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.
I agree haha I need to find more wires.
good content, bromigo :) The explanations on the side of why you are doing something are what most people need.
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
You're very good at explaining things!
Love this series please continue more
Great video Don im ordering a pico next week gonna try an follow this. Thanks
Thank You!!!!!! This was a awesome tutorial! Subscribed!
Great job, Don!
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
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!
super cool and great project's ideas !
Very well explained. Thanks
Great video tutorial, I would love to see more like this, I could eventually build hardware and customize my keys for Davinci Resolve, amazing
Thanks what my plan is with resolve!!!
@@NovaspiritTech Amazing can't wait
Would love to see the Pico in a custom mechanical keyboard! Maybe with a PCB designed specifically for it!
with not cheap platics keys. no analog split & none industry stardard.
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.
Zack Freedman made one recently.
ua-cam.com/video/Fg0V5M0llaE/v-deo.html
Edit: it’s not an official one but it uses the same chip so close enough
and how about antighosting? or when i press W in a game, my character move like bumping the W no constant
Ya that's what I was about to tell. As you told I just liked your comment.
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 =]
This is a great video. Thanks!
very cool. would love to see some videos using the C environment instead of the micropython. Thanks!
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.
thank you so much bro it really helped me 🔥🔥🔥🔥🔥🔥🔥
Love it keep feeding my Brain! I have a unique Idea, well not completely unique but a new mouse trap Idea.
Thanks so much! This was really useful! Does this work out with mechanical switch breakouts btw??
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.
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.
You should create a class for button, to avoid copy and paste every stuff at the beginning, nice work, love your videos!
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
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!
Adafruit has a debounce function, from adafruit_debouncer import Debouncer
see their learn guide
Love it thanks. Cheers, JAYTEE
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
nice love to see more pls...
Would love to see if this can be used for handwired keyboard using pico!
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!
Thank you!
If possible, did you ever implement a debounce routine or anything like that to prevent the buttons from sending their data multiple times? I'm trying to figure out a software debounce and haven't gotten anything working quite yet.
Amazing videos, can you do one using a rotary enconder kinda as a mouse scroll?. Thanks.
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.
good stuff, dude! I appreciate your explanations using hyposthiticals like 'if we typed this instead, you'd get...'
i think understanding what your doing is more important then just doing it. It will help grow more makers
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?
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.
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?
Thanks!
you made my day my man. I have a question. how about if we use a WIFI module, can we make it wireless?
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!
chris dehut has done it recently
As a gamer, I can say there's finally a reason to buy this lil succer.
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...
Superb
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?
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.
Can you make split keyboard using that ? And what if i want to use more than 28 button ?
the power icon was a mind blowing thing to be honesto
Can you possibly do a video to explore the idea of using the raspberry pi pico as something similar to a usb rubber ducky?
Thanks you !!!
There is no way to make it copy and paste a text , right ?.
The text included in the code.
Hi. Can you make while or if statement for when using a specific program to use a specific layout for that program on the key and a different on a different program (software)? Thx.
Btw, more of this kind of video would be lovely.
Love these projects with coding. More Please
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.
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 this same project but with the buttons sending MIDI notes.
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
15:00 Do we need diodes here? I don't know much about electronic circuits, but often there are diodes in custom macrokeyboards
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.
Im have the same idea to help with scrubbing footage in resolve.
@@NovaspiritTech - that's exactly what i was thinking! Thanks for replying.
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.
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!!🙏🙏
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
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 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?
can we use any momentary switch?
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?
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 ...
For more buttons, virtually unlimited, learn how to play with 74hc595 shift registers 😉
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
Thonny keeps given me an error that says it can't find the imports digitalio and board, do you have any idea why that is and how to fix it? Great video btw!
Great job, but how can I do the same exact thing for an Android tablet instead of PC ?
Thank you for this. I'm trying to do this project in the Raspberry PI 4, but it's not working. Is it possible?
How to ad encoder for move timeline in editing program
well this will be fun, now I can make a giant button matrix
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.
A text file as simple as the "raw data" tab this sight uses. www.keyboard-layout-editor.com/#/
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).
what video is the one to set up Thonny?
So you could just create a macro board with a Raspberry Pi and some Python … I love in what glorious technology we have!
can you tri-state pico gpio pins ?