Skip to content

This code allows you to use the Pimoroni RGB Keypad for the Raspberry Pi Pico as a macro keypad in C++

License

Notifications You must be signed in to change notification settings

joshuag1000/Raspberry-Pi-Pico-MacroPad

Repository files navigation

Raspberry Pi Pico MacroPad

Compile For the Pico.
This code allows you to use the Pimoroni RGB Keypad for the Pico as a macro keypad in C++
Setting what keybind each key is really easy to do and the code is written in a way that makes it easy to change what each key does.

Downloading

It is advised that you clone the latest version of the code when you want to use this project rather than using the latest release. The latest release might not contain the latest version of the code.

HTTP

The latest version of the code can be downloaded here: Download
Just dont forget to include the RGB Keypad library in libs/pimoroni-pico which can be downloaded here: Pimoroni-Pico

Git

Clone the repo:

git clone https://github.com/joshuag1000/Raspberry-Pi-Pico-MacroPad.git

Initialise submodules:

git submodule update --init --recursive

TinyUSB

This code uses the TinyUSB library in order to perform the hid keyboard responses.
To find the possible keys that can be used visit here: TinyUSB hid.h
ONLY KEYS FROM THE NORMAL KEYBOARD AND THE CONSUMER KEYBOARD are supported by default you will have to add any other keyboards yourself. Modifier keys such as CTRL and ALT can only be used with the normal keyboard.
The Code cannot be published pre-compiled because all of the keybinds are set in the code.

If you run into any bugs please open an issue.

Building

For building see:

# Install Dependencies
- name: Install Dependencies
run: |
sudo apt update
sudo apt install git cmake gcc-arm-none-eabi gcc g++ gdb-multiarch automake autoconf build-essential texinfo libtool libftdi-dev libusb-1.0-0-dev minicom openocd
# Setup the SDK
- name: Setup the SDK
run: |
mkdir /home/runner/work/Raspberry-Pi-Pico-MacroPad/Raspberry-Pi-Pico-MacroPad/pico/
git -C /home/runner/work/Raspberry-Pi-Pico-MacroPad/Raspberry-Pi-Pico-MacroPad/pico/ clone https://github.com/raspberrypi/pico-sdk.git
git -C /home/runner/work/Raspberry-Pi-Pico-MacroPad/Raspberry-Pi-Pico-MacroPad/pico/pico-sdk submodule update --init --recursive
# Clone Pimorini's Librarys needed for the code
- name: Clone Pimoroni librarys
run: |
git clone https://github.com/pimoroni/pimoroni-pico.git ./libs/pimoroni-pico
git -C ./libs/pimoroni-pico submodule update --init --recursive
# Builds the code
- name: Build the Code
run: |
export PICO_SDK_PATH='/home/runner/work/Raspberry-Pi-Pico-MacroPad/Raspberry-Pi-Pico-MacroPad/pico/pico-sdk'
mkdir build
cd build
cmake ..
make

If you have not used the Pico SDK before I recommend you read this to get started: https://rptl.io/pico-get-started

Links

The Pi Hut - Raspberry Pi Pico
Pimoroni - Raspberry Pi Pico
Pimoroni - RGB Keypad Base

Testing

This has been tested on:

License

The MIT License (MIT)

Copyright (c) 2022 Joshua Glass (SuperNinja_4965)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.