Giter Site home page Giter Site logo

pazos / rp2040-macropad Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 136 KB

Turn your dummy usb numeric keypad into a fully hackable macropad.

CMake 19.29% Makefile 0.91% C++ 74.04% C 5.43% Shell 0.33%
macropad pico-sdk raspberry-pi-pico rp2040 tinyusb

rp2040-macropad's Introduction

rp2040-macropad

Turn your dummy usb numeric keypad into a fully hackable macropad.

What you need:

  1. A Waveshare RP2040-Zero clone.
  2. An usb socket/cable
  3. An usb numeric keyboard

Why?

Because I needed to run some macros and I already have a dummy nice usb keypad. For 5$ and some soldering I now have a macropad :)

How?

The Pico is configured as a dual role usb host/device. It receives hid reports from the host port (gp0[d+] & gp1[d-]) and emits hid reports based on the current layer.

There's a numeric mode that reports key events as they arrived, with the exception of Bloq num, which is used to switch between layers.

Notes

  1. This is sample code. I'm sharing it here because I didn't find related projects online.
  2. This project has a few layers as an example. Please look at them and adapt them to your needs. But please do not submit PRs or open tickets for specific layers.
  3. I'm mostly done with this project :). It does exactly what I need and I already run it in production. Do not expect many changes. Patches are welcome as long as they fit the scope of the project: sample code to turn a dummy keypad into a macropad.

Compile time options:

In CMakeLists.txt:

USE_RGB_LED: drives a rgb led on gpio16.

USE_CDC_DEVICE: enables a composite CDC/HID device instead of a single HID device. Allows to reboot the rp-2040 board to program mode by typing dfu on the serial interface (i.e: echo "dfu" > /dev/ttyACM0 on Linux)

USE_EXTRA_KEYS_EPOMAKER_TH21: Bloq Num toggles between numeric mode and last macro layer. Tab and Backspace are used while in macro mode to switch to previous/next layer.

Credits

  • @hathach for TinyUSB project
  • @sekigon-gonnoc for Pico-PIO-USB
  • The Pi foundation for such an awesome microcontroller and related documentation :)

rp2040-macropad's People

Contributors

pazos avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.