There’s a small, however attention-grabbing cottage business in Raspberry Pi-powered macro keypads you should use so as to add some customized features to your PC. A number of years in the past, Pimoroni launched its Keybow, which depends on a Raspberry Pi Zero however you want to look ahead to it in addition each time you plug it in and it’s a must to program it in Lua. Then, this 12 months, the Pimoroni got here out with Pimoroni Keybow RP2040 and the Pico RGB Keypad base, which use the Raspberry RP2040 CPU and work with quite a lot of programming languages, together with CircuitPython. And, provided that the Raspberry Pico and different RP2040 boards can double as USB HID gadgets, there are a number of tutorials that designate how one can construct customized keypads utilizing them.
Nonetheless, Adafruit’s MacroPad RP2040 stands out from the remaining and is so helpful that even non-makers might want one, simply to make their lives simpler. Accessible both as an entire package for $49 or as a barebones (no switches or keycaps) for $34, the MacoPad RP2040 has a built-in RP2040 chip with a slew of useful options, together with an OLED display, a rotary encoder dial, 8MB of Flash storage, Neopixel RGB lights beneath every key and a Stemma QT connector for attaching different electronics akin to sensors and extra OLED / LCD screens. Whether or not you’re a maker who likes DIY tasks or simply somebody who desires a very versatile second keyboard, the Adafruit MacroPad RP2040 is your best option.
Specs of Adafruit MacroPad RP2040
|Processor||Raspberry Pi RP2040 (130 Hz, 264K of RAM)|
|Storage||8MB of Flash Reminiscence|
|Ports||USB-C / Stemma QT|
|Keys||3 x 4 hot-swappable sockets|
|RGB||One Neopixel RGB LED per swap|
|Display||128 x 64 SH1106 Monochrome OLED|
|Speaker||8mm Speaker / Buzzer|
|Extra Inputs||Rotary encoder (pressable), Reset button|
|Measurement||4.1 x 2.3 x 1.1 inches (104 x 59.5 x 29mm)|
|Weight||1.2 ounces (34g)|
Configuration Decisions for Adafruit MacroPad RP2040
You should purchase the Adafruit MacroPad both as an entire Starter Package for $49 or simply the board for $34, after which you have to another parts. The $49 package comes with the board, 12 Kailh linear crimson key switches, 12 clear keycaps and the MacroPad enclosure package, all of that are additionally bought individually at Adafruit.com. The $5 enclosure package is a must-buy if you happen to get the naked board, as a result of it features a backside plate and ft to go under the board, a prime plate that holds the important thing switches in place, a rubber knob that sits on prime of the rotary encoder and the screws you want to connect the underside plate.
As a result of I don’t like the texture of linear switches, I purchased the naked board and the enclosure package and introduced my very own key switches, a set of very-clicky Kailh Field Jades. I connected some clear keycaps I had sitting round, however ultimately additionally purchased some translucent blue caps that Adafruit sells individually. Briefly, if you happen to like linear switches or don’t care by hook or by crook, it’s best to purchase the complete package. In case you choose different switches, do what I did. No matter you do, be sure you’re getting the enclosure package; you want it.
Design of the Adafruit MacroPad RP2040
At 4.1 x 2.3 inches, the Adafruit MacroPad RP2040, could be very compact, utilizing the minimal quantity of area to show its 4 rows of three keys every, with a small 128 x 64 monochrome OLED show and a rotary encoder lining the highest row above the keys. On its again aspect, the MacroPad RP2040 has a USB-C port to get energy and trade information with a pc. On the left sit a bodily reset button and Stemma QT port. To enter boot choose mode — for putting in new firmware — you need to press down the rotary encoder whereas powering on the gadget.
The MacroPad has a bit of little bit of a NASA theme to it as there’s a tiny icon of an area shuttle close to the encoder and the phrase “Speaker” on the board is written in a really NASA-like font. In case you get the enclosure package or the Begin package which has the enclosure inside it, the underside piece has an image of the keypad and dial together with the phrase MacroPad written in the identical font. Relying on the way you program it, there’s additionally plenty of alternative so as to add coloration as every key has an individually-addressable RGB Neopixel gentle beneath its swap.
Extra importantly, the underside board lifts the keyboard 1.1 inches off your desk however that also left it considerably decrease than my common keyboard. There’s no built-in option to modify the peak of the MacroPad RP2040, however Adafruit does have a few 3D-printable enclosures / stands you should use with it, supplied you have got entry to a 3D printer.
Meeting and Set Up of Adafruit MacroPad RP2040
Establishing the Adafruit MacroPad RP2040 was a reasonably fast course of, although getting all 12 switches to stay within the hot-swappable sockets on the board took a few tries as a few instances switches popped out once I tried to push the plate from the enclosure package down on them. I discovered that placing all of the switches into the plate after which pushing down is likely to be simpler. Nonetheless, after I had all of the switches on board, they had been sturdy and didn’t come out from common use.
Screwing on the underside plate takes only a second and chances are you’ll need to do it earlier than you pop within the switches, simply so that you don’t unintentionally dislodge them throughout the course of. And, whether or not or not you get the enclosure package, you need to undoubtedly connect some type of cowl knob to the rotary encoder dial, a course of that takes a couple of seconds.
To do something with the MacroPad RP2040, you’ll want to put in CircuitPython firmware, specifically proper now model 7. As with all different RP2040 board, it’s straightforward sufficient to try this. Simply obtain the suitable UF2 file from MacroPad’s page on CircuitPython.org, launch the gadget into boot choose mode (by holding down the rotary encoder button whereas powering on / connecting to your PC) and drag the UF2 file over to the board, which seems as a storage drive with the label RPI-RP2 (as on each different RP2040 board).
You’ll additionally need to set up some CircuitPython libraries. Relying on what you need to program, it’s your decision the displayio, adafruit_hid or adafruit_displaytext libraries, amongst others. Adafruit additionally has a devoted adafruit_macropad library, only for this gadget.
Programming the Adafruit MacroPad RP2040
Whereas the RP2040 SoC helps a number of different programming languages, together with C, MicroPython and Arduino language, you’ll actually need to code this in CircuitPython. Adafruit’s fork of MicroPython has built-in help for turning any RP2040 gadget, together with this one, right into a USB HID gadget you should use like a daily peripheral in Home windows, Linux or macOS. It additionally has libraries particularly for the macropad and for the Neopixel RGB lights and the display.
Identified for its detailed and useful tutorials, Adafruit has a minimum of six tutorials on how one can program the MacroPad RP2040, every of which has code that you could simply obtain and use. Probably the most helpful of those is the MacroPad Hotkeys tutorial, which gives a template for creating completely different macro keysets for various apps. By default, the code within the tutorial consists of 9 macro units that embrace Microsoft Edge in Home windows, Adobe Photoshop in Home windows or Mac and Firefox in Linux. You simply flip the rotary encoder to decide on amongst macro units whereas the display reveals what every key does. Utilizing this tutorial and pattern code alone is likely to be sufficient for a lot of customers.
Nonetheless, since we wish to construct our personal applications, my son and I created a couple of easy applications for the MacroPad RP2040. First, we coded a program that turns the gadget into an digital keyboard the place the primary seven keys signify the A by G keys on a pian, holding down one other key makes them sharps and rotating the rotary encoder modifications the octave, which is displayed on the display. Since we used the interior speaker, the sound wasn’t significantly high-volume or lovely, however it labored. We additionally coded the MacroPad to play complete songs after we pressed a button.
Probably the most helpful program I wrote for the MacroPad RP2040 is one which merely maps every of the keys to perform keys F13 to F24. Utilizing just some traces of code, you may map the 12 keys to any current keyboard key or keyboard mixture. For instance, if you happen to needed to make a “copy” button, you possibly can map CTRL+C to certainly one of MacroPad’s keys. Or, if you happen to don’t have a numeric keypad in your principal keyboard, you may flip the MacroPad into one.
I selected to make my keys into F13 – F24 as a result of these prolonged perform keys, that are absent from 99% of PC keyboards, aren’t already assigned to anything. So I may then use a devoted macro program on my PC, in my case AutoHotKey, to assign complicated macros or program launches to them, with out worrying about interfering with anything.
Use Instances for Adafruit MacroPad RP2040
The obvious use case for any macro keypad is as a second keyboard that offers you extra keys. With a couple of traces of code, you can also make every key ship a keyboard mixture or devoted perform key message to any laptop you plug it into. Nonetheless, there are different potentialities.
Like me, you may program the MacroPad RP2040 to play music. Or you should use it to create easy video games like Simon Says or this TK tutorial from Adafruit.
One other sensible use for the MacroPad RP2040 is as a Time-based One Time Password (TOTP) generator that you should use because the second think about 2FA for varied companies the best way you employ Google Authenticator in your telephone. Adafruit has a great tutorial on how one can use the pad for TOTP and every key will be for a unique service.
You may also join a Stemma QT gadget akin to an accelerometer, air high quality monitor or contact sensor to the MacroPad RP2040. The probabilities are almost countless.
There’s quite a bit to like concerning the Adafruit MacroPad RP2040 and never a lot to quibble with. The pad gives way more flexibility and performance than opponents such because the Pimoroni Keybow RP2040. Nonetheless, if you happen to don’t like the thought of placing collectively and coding your individual keypad, there are a lot of off-the-shelf keypads such because the Elgato Streamdeck line or the Coolermaster ControlPad.
No gadget is ideal. I want the MacroPad was peak adjustable so I may get it to the identical peak and angle as my common keyboard, although 3D printing a stand may get me there. Having a coloration moderately than a monochrome display could be one other plus, however one which undoubtedly would add to the value.
Nonetheless, all issues thought of, the MacroPad RP2040 is a unbelievable gadget that any digital hobbyist or productiveness geek would love. Simply think about whether or not you want linear switches or not. In case you don’t, skip the starter package and purchase the naked bones package and the enclosure package, together with the switches and caps of your alternative.