Raspberry Pi Pico Macropad / Keypad

by Sn3ll in Circuits > Raspberry Pi

5249 Views, 16 Favorites, 0 Comments

Raspberry Pi Pico Macropad / Keypad

Raspberry Pi Pico RGB Macropad - DIY Keypad By Pimoroni

I've always wanted a macropad so here is my first attempt at putting together a DIY macropad on the raspberry pico and testing to see how much I like them and if I'll get the use out of it. I've set up the keypad for my own custom macros and shortcut keys for my most used programs.

Parts

Pimoroni: https://shop.pimoroni.com/products/pico-rgb-keypa...

Header pins: Link

Pi Pico: Link

Soldering & Assembly

Screenshot 2021-03-09 at 18.25.22.png
Screenshot 2021-03-09 at 18.25.12.png
Screenshot 2021-03-09 at 18.24.44.png
Screenshot 2021-03-09 at 18.25.02.png
Screenshot 2021-03-09 at 18.26.09.png
Screenshot 2021-03-09 at 18.24.27.png
Screenshot 2021-03-09 at 18.24.08.png

Mount the header pins to the Pimoroni PCB, thee should just push in.

Once you have the header pins in the PCB the pico should just sit on top of these pins. This will ensure the pins are straight for soldering.

Apply solder to each pin whilst it is on the PCB board.

Example Code

Screenshot 2021-03-09 at 18.21.44.png
Screenshot 2021-03-09 at 18.26.09.png

On the pimoroni site the have a github that has examples for varoius pico project this is where we will download the fireware and example code.

Here is the GitHub. https://github.com/pimoroni/pimoroni-pico

Download the .UF2 file from GitHub and hold the boot button on the pico when you plug it in. It will show up as a mass storage device this is where you want to copy the .UF2 file. Once you have copied the file to the drive it should reboot the pico.

Once you have done this it should be as easy as copying the example keypad directory from GitHub into the Picos storage folder when it shows up again and reboot.

You should now have the demo code of coloured buttons. Press each key and it will move on to the next colour. But this doesn't do much as a macropad so let's try some custom code.

Custom Code and Macros

Screenshot 2021-03-09 at 18.26.41.png

To get the pico to work as a macropad we have to set it up ad a HID ( Human Input Device ). I found a great github that has already done this for us.

Code: https://github.com/qbalsdon/pico_rgb_keypad_hid

This walks through everything you need to know to get set up using your custom macros.

1. Download the new .uf2 file.

2. Copy all folders to the pico.

3. Copy and edit the Keypad.py file to your own custom macros.

3D Printing Case

Screenshot 2021-03-09 at 18.27.45.png
Screenshot 2021-03-09 at 18.28.15.png
Screenshot 2021-03-09 at 18.29.10.png

Once you have your macros working you might want a nice case to go around it, here you go a case. Please remix this as you see fit and share it if you make it on thiniverse so we can get some more cool desings.

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

Have a great day making:)