Transform an old broken Keyboard to a Macro Keyboard
Вставка
- Опубліковано 20 жов 2024
- Watch the new version on my channel
This is version one of the Raspberry Pi Pico Macro Keyboard Project using the Adafruit HID library.
I have collected a few broken keyboards over the past few months and without trying to fix them, I thought it might be better to give them a new life.
In this project video I will show you how to turn your Raspberry Pi Pico into a Macro Keyboard. All the resources are available (code and Gerber files) if you want to order your own PCB.
I hope you find this videos helpful and I if you learned something from it, consider subscribing to my channel.
If you have any questions don't hesitate to ask.
GitHub Repository:
github.com/Gui...
I made a new version of this keyboard go watch it on my channel.
This is an awesome project, very useful indeed :)
Very cool project! We like it 😊
Thank you, and yes a big thanks to you guys for providing excellent PCB'S at a low price otherwise these projects would be difficult to create.
@@NerdCaveYT 👍
I found Adafruit's MacroPad actually quite expensive for the functionality it offers. Nice that you were able to make your own at such low cost. Well done!
Thank you, I have been playing around with a new microcontroller have to program through arduino but should be able to bring cost below 9 dollar for 20 keys macro board. Will hopefully make a new video on it if the board works
@@NerdCaveYT sounds great👍 looking forward to your next project video
Very interesting project. Thanks for share it
Thank you, i got this running in half an hour. Only problem i had was downloading the circuit python file as a "Save as" from Chrome under Windows10 and it wasen't installing. I had to download your repo and drag and drop the file which installs it instantly for the CIRCUITPY to come up.
I then plugged it into my Ubuntu laptop and the macros are working there too as a plug and play, amazing!
I should actually make seperate repo's not to have everything under one making it difficult to download but glad it worked I have designed a second version but moved recently hopefully can make a video on it new version allows you to expand the size easily
Been looking for a way to do HID on the pico for a while, stumbled upon this unrelated to my searches and was very helpful!
Great to hear! the newest version I did on my channel is better written as it allows you to make different modes
Very nice and useful project!! Cheers!! 👍
Thank you
A small mistake on schematic for the simple 4 button demo, the voltage should be connected to Pin36 the 3V3 out. I am famous for writing the wrong things in the table next to the schematic
Can you send me some info on how to put this together with jumper wires. Could you also make this with a rotary encoder(for sliding the screen right or left), thanks
HELP..i am from germany so i have an german layout.Can u help me get an german layout
@@LightSkip_rb I see different layouts are available here: github.com/Neradoc/Circuitpython_Keyboard_Layouts/tree/main/libraries/layouts never thought about it when making this video, something I can add for follow up video
hello, i have a problem vompiling my code, i get the error: ModuleNotFoundError: No module named 'usb_hid'. but i downloaded several libraries, that must have them. i dont really know what im doing wrong, can you help me
Just to double check do you have all the libraries in a adafruit_hid with the following inside github.com/Guitarman9119/Raspberry-Pi-Pico-/tree/main/Pico%20Macro%20Keyboard/adafruit_hid and you have CircuitPython on the Pico?
@@NerdCaveYT i had the installed correctly, but i forgott to select the interpreter in thonny
@@LWUndsoo ah okay is everything okay now?
@@NerdCaveYT yes
thank you so much, i was troubleshooting an error for 1 hour and at 2:00 you show it; connect to vbus, not gnd for second pin (i have now read comments and found that it is 3v3 on pin 36)
I have been constantly making mistakes with the connection diagram and in few videos pinned a comment sorry for that, always something small I miss during editing or when using fritzing
@@NerdCaveYT it's ok, at least it's not like me who connected it to ground
I also read comments often
Cool project! Could you use a joystick as a mouse? That seems like a cool addition.
Sounds like an awesome idea thank you, will try and add it to version two and see how it operates.
Joysticks are so underrated
How do I access the Gerber file to order it? I'm in the github and I download the zip file for "Pico Macro Keyboard/Gerber_pico keyboard_2022-03-24.zip" and when I try to put it so that I could order it, it says "Invalid file format".
I just downloaded the gerber github.com/Guitarman9119/Raspberry-Pi-Pico-/blob/main/Pico%20Macro%20Keyboard/Gerber_pico%20keyboard_2022-03-24.zip and in JLCPCB I clicked Add gerber file and it loaded in and I could order, what are you using to order the PCB
@@NerdCaveYT Thank you 🙏, the problem was that I extracted the zip file before trying to insert it. It’s all fixed now. And I’m ready to make my purchase! Thanks
I need such keyboard! Where i could buy online already put together alternative?
If you are looking for a Pico version I found this online: shop.pimoroni.com/products/pico-rgb-keypad-base?variant=32369517166675 it is a bit more expensive but no soldering required.
did you set this up to be recognized as an HID Device when plugged in? Mine always shows up as a removeable storage when its plugged in.
did you save your main file as code.py or boot.py so that it will run the code when plugged in?
0:23 you completely missed the opportunity to play a rick roll
I did that on the Raspberry Pi subreddit and got shadow banned. Those mods on reddit . . . . what can I say
@@NerdCaveYT the pi subreddit is literal cancer
@@whitewolfsounds2273 I gave up on reddit, I was sharing short clips did not spam my channel to self promote then the mods just shadowban me. I even got a sh#t reply to say I can promote my 36 videos somewhere else.
sir if we order the pcb from easy eda , is that included with the mechanical switches........because in the 3d view of the designed pcb mechanical switches also shown in it
Easy eda is just the platform to create a PCB in, there are options you can add components and get it soldered through jlpcb but have never used that service before.
@@NerdCaveYT ok thank you sir
omg this is awesome could u pls bring this at the beginning of the school plsssssssssssssss (im marina :)
where did you find the footprint for the raspberry pi pico? trying to do the same thing you did with your pcb but cannot find a footprint for the pico
The one I used is user contributed, there are a few good ones when you go to common library search raspberry pi pico and under classes go to user contributed. The one I used has the title: RASPBERRY-PI-PICO_TH
Can one control the media player even if the player is not an active window?
Yes, the mediaconsumer controls are the windows one so you can
Great explanation. How many buttons can I add, as many as there are gpio? I only actually need 16.
Thank you, if you use a single GPIO pin then 26 , if you do it in a matrix setup then 169 keys
Love to see Pico W Bluetooth macro keyboard
I am not completely sure how it will work, I tried looking for documentation since it will require some python script to receive the data encode it to keystrokes so might need to look into python bluetooth keyboard then can add this to the pico W
Nice project. I have an old raspberry pi 1.1b (I think) and want to use it to plug on a pc and emulate various series of inputs from the keyboard as well as the mouse, for very annouying MMO games stuff (say, an autoclicker that clicks 4 times in a second on an eternal loop). Can this be ported to it?
I will have to have a look at it, there should probably be libraries that allows the Raspberry Pi to be an HID device, I have not worked with the Raspberry Pi that often just once installing retro pi
Can you make a video or something on how to make this with a rotary encoder(for sliding the screen right or left), thanks
busy with it
I was thinking of using an old keyboard to take advantage of its keys by connecting it to an Arduino or Raspiberry pi, and converting the keyboard's key information into customizable buttons, to avoid incompatibility with the standard buttons on my keyboard. In that case the keyboard would be recognized as an input device, like a joystick, with 104 keys.
Would it be possible to do this?
Just to have a bit more context do you want to take an old keyboard and open it to find the matrix key presses so that you can use it as input, or do you want to plug the keyboard USB into the raspberry Pi and then change the input of the old keyboard to send different programmed key presses to your pc.
dude your awsome you need more subs
I appreciate that! I have taken a very long break from youtube but will be back soon
Nice!
any way to convert this board in plug n play? For create Midi Controllers and after sell for musicians
I have made a DIY midi controller video with the Pico on my channel, just a few things needs to be changed
@@NerdCaveYT omg, plug and play? i am going to watch!!!!
@@caiobaima842 well you still have to setup with you daw but then afterwards plug and play I am no expert with DAW and just did a basic example in the video
Hi. Thanks for your video, you are a very didactics. What happen if we want to add another macro pressing one button? If we want to use another interface like an APK or software for program another macros. How to do this? Is it possible? Maybe desgin a simple app and connect the pad to the cellphone?
It would be possible to create a program for it to easily adjust each key but my programming skills is not there yet, I am receiving a new PCB hopefully today an updated version of the macrokeyboard, for this one I added a button to swap through different programs so that I can have macro's for my most used programs. I am thinking about making a course on it since it can then be a long format video that will explain in depth how it works, from PCB design all the way to final product if there are people interested in it.
Thanks for posting this. I have an Razer Tartarus Pro that I want to convert to a programmable macropad with non-volatile memory for use with a Pop_!OS linux desktop. I currently use Genovation Controlpads and love them but the hope was that if I convert the Tartarus Pro to a macropad I would be able to execute the macros while keeping my eyes on the screen if I could memorize where the keys are. I leaning toward QMK because it is open source and seems to be widely adopted but something like your solution would work weel also.
Thank you for posting all of the details. Please post more videos like this.
I want to look at QMK as well, I don't know so much about the different firmware available, I think it will probably be easier or more functionality, but I don't see a lot of written tutorials or content on it, so might have to figure it out and make a video on what I have learned.
Id love too see something like this too, im have Frankensteined a 23 key keyboard (koolertron) and a razer nostromo hand rest but id like to redo it with all 3d printed parts and use a micro controller so i can easily remap keys (the koolertron) software is the old version and doesnt play nice anymore
Can I add and I2C screen (2x16) characters to that keyboard? using circuit python?
For example, I set button 1 to "ctrl+c" and i want to show on my screen "copy"
Yes you would be able to do that, so basically all you will do is that you will import the 16x2 character lcd library, tutorial her learn.adafruit.com/i2c-spi-lcd-backpack/python-circuitpython , I have only covered it with MicroPython so far. You will write a message like you said to show on screen for x amount of time and then clear, for version two of this board I am planning to show it for that lcd and the OLED I2C display. If you need any help let me know. I did plan to make a discord server so you can reach me here: discord.gg/Mym6UffWEA
@@NerdCaveYT It would be nice that you can teach us, I really cant make it work with circuit python but i can i micropython - thanks
I am a bit late but I have made the video, hope it is still helpful...
Hey there!
I just built your 4 button demo one (After forgetting some basic breadboard techniques), and now I am really curious about making the PCB.
If possible, can you send me the easyEDA file? (I want to mess around with it and maybe fix the odd pin numbering if I can figure it out)
Also, do you have a good Amazon link for some keys that would fix the PCB?
Thanks for the awesome video!
Hello, the pcb file is in the GitHub repository for easyeda, for the keys I think any standard ones will do, I am not sure what is good on Amazon because here in China taobao is what locals use and how I source things here. I should have a second version coming soon, with more capabilities to expand and more functionality.
@@NerdCaveYT Hi!
The only file that I see on GitHub is the GERBER file, and I cannot upload that into EasyEDA. Can you send me a comparable file, or add it to the respiratory?
Thanks!
oshwlab.com/vwpeens/raspberry-pi-pico-macro-keyboard I thought this link was there
Very cool project dude, keen to build one. Do you have a preferred local place to have the PCB made, or ordering that from overseas? If you have spare, I'd love to buy one from you. Ek's in Slaapstad.
Hello thank you, well I am currently in China or been here few years so ordering PCB is super easy since JLCPCB factory is here and like super cheap due to almost no shipping, around R50 for 5 PCBs, I think it might even still be cheaper to ship one to you instead of buying it yourself I am unsure. How much does JLCPCB ask for shipping to SA?
@@NerdCaveYT oh, interesting, thanks! I will have a look into that option.
Aah a bitluni fan😁
I really had no idea he uses that song when I saw bitluni I kept wondering and thought isn't that the guy with the massive LED wall and went to his channel and heard the song
Looks great I want to make one, did you ever make another version?
I did make another version, just have not recorded the video, uploading another project today then I can start recording the macrokeyboard v2 one
Would love to see version 2. Your accent sounds familiar would you be from South Africa. If so it would help in getting a pcb from your order.
@@NerdCaveYT good news! thanks for the reply.
By mistake on the schematic do you mean tue table or the diagram itself. (I barely know anything, this is my first raspberry pi project
can you tell me which time in video I remember the VCC or GND on the breadboard image was switched
Bro, can i get pcb link
??
It is on GitHub the PCB Gerber
hi, can you make a video of how you make the phisical pcb please ? thanks bro
Hi do you mean designing the PCB in easyeda?
@@NerdCaveYT hi, i mean to cnc pcb for keyboards in home, like with dremel or another stuff
@@martincaneva4247 I have never tried to make a physical board myself, I know some people buy two sided copper plate and use CNC or use market with certain chemicals. It would be something worth trying in the future to explore
@@NerdCaveYT i am gonna try it, because i am from Argentina and import products its completely restricted, no china no USA products can enter in the country. Thanks a lot. Keep in touch
Broooooo this is awesome 👏
Thank you
nice video, I would like to add Bluetooth and a rechargeable battery, is that possible?
I believe so, but I am not sure on software side how you would go about that, I never tried to communicate to computer bluetooth etc. and how to setup the data you receive from the pico with bluetooth to carry out the macros. I think it would be more of a software design challenge
it's so complicated to build with pico. It's annoying to have to press a button just to plug-in the usb.
what do you mean? you only press the bootsel button once when uploading either MicroPython or CircuitPython once and don't need to again
Can i use this as a midi keyboard?
Yes you can but will have to use the Midi library, there is a video on creating a Midi controller
Can you send me some info on how to put this together with jumper wires
you mean without pcb?
Surely the breadboard example and the schematic should be enough for you to work that out yourself?
Hoegaanit famalam! How's the progress on the pi board?
hey goed dankie en daar? I made a second version just been so busy and procrastination next week I have holiday so can work on it
Why no pullup resistors on button?
All the buttons is connected to positive on one side and then in code detect for a high, to avoid like button being pushed twice or denounce I added a short delay in code to avoid it from happening, the delay will probably depends on how long someone press the key
@@NerdCaveYT but adding pullup resistors wouldn't require the delay you mentioned, no? Or help more at least.
@@hopcfizl3671 the pull-up will not help with the debouncing of someone that press button to long, but will help with noise accidentally trigger the button. For example the pins is kept at 3.3V and connected to the pico it is 0V once it detect a voltage higher then 2.3-2.5V range it will be a high or 1 and the code will execute. So if you were to touch the button pin which is connected to pico you might be able to trigger it without pressing but since it is in a case very unlikely. The setup of keyboard is that they use a matrix grid so you can get more inputs so having a resistor would not work so well for 100+ keys but will need diodes to avoid ghosting
@@hopcfizl3671 I have a version 2 made with RGB and you can add more boards to expand number of keys which I hope to get back to it soon and make a new video
@@NerdCaveYT ok thanks
"kept in place with plastic" @ 6:48. what is that stuff
I didn't know the english word for it but seems to be Tack or the most popular one is Blue Tack or Pritt Multi Tack. I use it often to keep things in place not sure is it ideal but did not have any problems so far just remove it after soldering
"Prestik", as marketed in South Africa. Just look for multi purpose reusable adhesive where you are.
Working good on desktop
but i want use this macro project on Chinese machine but Chinese machine did not detect Raspberry Pi Pico ase a keyboard
Please help me
By Chinese machine what do you mean by that? All my computers were bought in China and have Chinese version windows on it
This machine did not detect raspberry pi pico
www.google.com/search?q=100+ton+weighing+bright+intelligent+machine&tbm=isch&ved=2ahUKEwi0_5rp1NGCAxXWZmwGHdXPDfEQ2-cCegQIABAD&oq=100+ton+weighing+bright+intelligent+machine&gs_lcp=ChJtb2JpbGUtZ3dzLXdpei1pbWcQA1CeFFj5KmDaLGgAcAB4AIABAIgBAJIBAJgBAKABAcABAQ&sclient=mobile-gws-wiz-img&ei=FdZaZfSgE9bNseMP1Z-3iA8&bih=751&biw=428&prmd=isvn&rlz=1CDGOYI_enIN1051IN1051&hl=en-GB#imgrc=KNHBou9_x63AoM
Dude! Hoe gaan dit? Nice channel BTW!
Dit gaan goed en met jou? Het jy dalk discord, dis moeilik om whatsapp the gebruik hierso, en dankie
hi so i have made this project (only the breadboard part) but i get a keyboardinterrupt thrown at me... i just have the example code and this is the error:
Traceback (most recent call last):
File "", line 71, in
KeyboardInterrupt:
that's at time.sleep(0.1)
it sounds like when you press ctrl+c as a macro in thonny it interrupt your program, once you upload the code exit thonny then test it and see does it work
@@NerdCaveYT how do i run without thonny?
@@daan5532 you have to save the script as main.py and flash it to your pico
@@edwardtan1354 I'm sorry, i am a new one to the pi pico... So could you please explain how to flash it to my pi pico
@@daan5532 you use thonny to flash it... it should give you the option else check jeff geerling's pico video
7:08 this song is seem familiar...
Jeremy Blake - Powerup! you probably hear it a lot it is a non copyright song a lot of creators use
Hello, Thanks a lot for your various videos! I learned a lot thanks to you.
Could you please learn us, how to call an URL with circuitpy ?
(Press a button that can redirect me to an URL)
In my code you can adjust it for example what you are opening, their is the GUI library so for example windows then pause then chrome, then the url and enter
keyboard.send(Keycode.GUI)
time.sleep(0.3)
write_text.write('Brave
')
time.sleep(1)
write_text.write('ua-cam.com/video/l7SwiFWOQqM/v-deo.html
')
in your case it might be chrome for example the
is new line which is same as enter key
@@NerdCaveYT thank you a lot, for taking some time to answer me. Btw, I'm using brave also :)
bro help me out in codes please
what is wrong with the code?
@@NerdCaveYT everything is giving me problem so can we talk like and discord or instagram? ?
@@MineOrebaker discord.gg/vUmRzd8U
🇿🇦 ?
Yes I am
we can and nerd allready did decade ago. now normal peepol wooooh. we can do stream deck.
or you can have another keyboard. look how many keys LOL
..decade later normal peepol add another keyboard and all keys do some function LOL
Hi, I am not sure were you replying to someone else comment
I have a issue with my Copy button I made. It keeps causing thonny to state that "Keyboard Interrupted" and I lose all functionality of my keyboard. here is what I wrote. I have 9 other buttons and they dont do that.
if btn1.value:
keyboard.press(Keycode.CONTROL, Keycode.C)
time.sleep(0.1)
keyboard.release(Keycode.CONTROL, Keycode.C)
time.sleep(0.1)
The issue is if you have thonny active and press Ctrl c is to stop the program once you save it as main.py on the pico and for example use it in notepad etc. you should not have this issue.
@@NerdCaveYT wow that was simple . Was losing my brains wondering what I did wrong out of the blue. That keyboard interrupted thing is a pain. Thank you! Also, when I do get my pcb made etc...Thonny has to be running to activate the macro board?
@@hakimdurand8427 as soon as you save your program as main.py and you plug in the pico it will automatically run the main.py code the only way then to reupload other code will then be to go in thonny and interrupt the main program by pressing Ctrl+C then.
@@NerdCaveYT ahh now I understand. Once again thanks for this beautiful information but I have ONE more issue..When I now use Ctrl+V it reboots the entire pico everytime I press the button for paste...
@@hakimdurand8427 does it do this even if not in thonny the reboot? What happen if you change the code to something else does it still do this? Just to ensure is it a code problem or connection