Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions hackpads/playbackpad/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*-backups
fp-info-cache
firmware/kmk
firmware/boot.py
pcb/gerber_to_order
29 changes: 29 additions & 0 deletions hackpads/playbackpad/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Playbackpad

A pad with a rotary encoder and 3 switches to control playback and volume. I made this because it's painful to go to the app and click on pause every time it's my time to talk in a meeting <i>yes I listen to music while meeting 😁</i>.

## PCB

I quite enjoyed the PCB making process even though it was painful to find libraries for the OLED so I didn't use it.

Schematics | PCB
:--------: | :-:
![Schematics](images/kicad_f89OjKkaKC.png) | ![PCB](images/kicad_zTUGdFkLCO.png)

## CAD

Made the casing with Fusion 360, quite painful to make the holes ngl 💀🙏

![Casing](images/307d369a-21b9-4ea1-92bc-5f00588191d4.jpg)

## Firmware

Made it with KMK firmware, the rotary encoder for volume, the switch on the rotary encoder for mute/unmute, the left key for previous, the middle key for play/pause, the right key for next.

## BOM

- 3 Cherry MX switches
- 3 Black Blank DSA keycaps
- 4 M3x0.5x16 mm screws
- 1 Seeed XIAO RP2040
- 3D printed case
48,346 changes: 48,346 additions & 0 deletions hackpads/playbackpad/cad/design.step

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions hackpads/playbackpad/firmware/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import board
import digitalio
from kmk.kmk_keyboard import KMKKeyboard
from kmk.keys import KC
from kmk.modules.encoder import EncoderHandler
from kmk.extensions.media_keys import MediaKeys

keyboard = KMKKeyboard()
encoder_handler = EncoderHandler()
encoder_handler.pins = ((board.GP0, board.GP29, board.GP3),)
encoder_handler.map = [((KC.AUDIO_VOL_DOWN, KC.VOL_UP), KC.AUDIO_MUTE)]
encoder_handler.acceleration_interval = 100
keyboard.modules = [MediaKeys(), encoder_handler]

keyboard.keymap = [
[
KC.MEDIA_PREVIOUS_TRACK,
KC.MEDIA_PLAY_PAUSE,
KC.MEDIA_NEXT_TRACK
]
]

keyboard.gpio_pins = [board.GP4, board.GP2, board.GP1]

for pin in keyboard.gpio_pins:
btn = digitalio.DigitalInOut(pin)
btn.direction = digitalio.Direction.INPUT
btn.pull = digitalio.Pull.UP

if __name__ == '__main__':
keyboard.go()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackpads/playbackpad/images/kicad_zTUGdFkLCO.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading