Git Product home page Git Product logo

pico-mpad's Introduction

Pico Mpad

A 3D printable macropad for automating frequently repeated actions.

Hardware

To build this project you need access to a 3d printer. The model folder contains 4 parts, with 3 of them being the main components of body: top, bottom, lid and an additional keycap component. The keycap model contain only one instance of the keycap, make sure to print 12 of them and feel free to experiment with colours.

Bill of materials

  • Raspberry Pi Pico
  • Keyboard switch (x12)
  • M3x12 screw (x4)
  • Connection wire

Print

The models can be downloaded from printables here.

Assembly

  1. Populate the key switches slots of the "top" printed part with the MX switches.
  2. Solder the switches one to another to create a matrix as shown in the schematic.
  3. Solder Pico to the matrix, make sure that wires are soldered to the bottom side of your Pico.
  4. Insert the microcontroller into its slot in the "bottom" printed part.
  5. Secure Pico with the "lid" printed model with the knob facing downwards.
  6. Screw together the "bottom" and "top" parts with the m3 screws.
  7. Put on the 3d printed "keycap"s on the key switches' tips.
  8. Optionally, you can stick some rubber feet on the bottom side of the device.

Software

Installing CircuitPython

The software is written in CircuitPython 6.3.0 and uses the HID module of CircuitPython Library Bundle.

  1. Download the CircuitPython UF2 from the official website here.
  2. Push and hold the BOOTSEL button and plug your Pico into the USB port of your computer. Release the BOOTSEL button after your Pico is connected.
  3. It will mount as a Mass Storage Device called RPI-RP2.
  4. Drag and drop the CircuitPython UF2 file onto the RPI-RP2 volume.

Installing HID libraries

  1. Download the library bundle for the CircuitPython version you installed 6.3.0 by default from here
  2. Unzip the bundle; Copy adafruit_hid from the lib folder to <CIRCUITPY DRIVE>/lib/

Software installation

  1. Download the software
cd ~
git clone https://github.com/dr-mod/pico-mpad.git
cp pico-mpad/src/*.py <CIRCUITPY DRIVE>

Configuration

To configure action modify key_mapping.py

At the moment there are 3 types of commands supported:

  • STRING - a sequence of characters printed when a button is pressed e.g. "Hello, world!"
  • KEY - a single key or combination of keys e.g. A or Ctrl + C. List of supported keycodes.
  • CONTROL_CODE - a control commands e.g. increase brightness, List of supported control codes.

Example configuration:

# ROW 1, COLUMN 1
(CONTROL_CODE, cc.PLAY_PAUSE),
# ROW 1, COLUMN 2
(CONTROL_CODE, SCAN_NEXT_TRACK),
# ROW 1, COLUMN 3
(CONTROL_CODE, SCAN_PREVIOUS_TRACK),
# ROW 1, COLUMN 4
(STRING, "sudo shutdown now \n"),
# ROW 2, COLUMN 1
(KEY, [kc.F4]),
# ROW 2, COLUMN 2
(KEY, [kc.GUI, kc.C]),
# ROW 2, COLUMN 3
(KEY, [kc.GUI, kc.V]),
# ROW 2, COLUMN 4
(CONTROL_CODE, cc.VOLUME_INCREMENT),
# ROW 3, COLUMN 1
(KEY, [kc.F20]),
# ROW 3, COLUMN 2
(KEY, [kc.ALT, kc.A]),
# ROW 3, COLUMN 3
(STRING, "Hi, this is a scripted message!"),
# ROW 3, COLUMN 4
(CONTROL_CODE, cc.VOLUME_DECREMENT)

Support the project

If you would like to support what I do and keep me caffeinated, you can do it here:

"Buy Me A Coffee"

pico-mpad's People

Contributors

dr-mod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pico-mpad's Issues

knob

Can I change one or two switches for knobs to control the volume? What would have to change in the code?

Macro pad page up and down

Hey dr-mod i have a quick question. Is the page up and down key just key.PAGE_UP and DOWN or is it something different? Thank you.

Raspberry Pi Pico Board RP2040

Hello, is this 3d model suitable for the Raspberry Pi Pico Board RP2040 TYPE C. And what is the hole in the 3d model bottom for?

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.