Skip to content

Commit 5523e63

Browse files
authored
Merge pull request #519 from dave9123/main
Added Playbackpad
2 parents 215214c + 8b6ed97 commit 5523e63

18 files changed

+103545
-0
lines changed

hackpads/playbackpad/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*-backups
2+
fp-info-cache
3+
firmware/kmk
4+
firmware/boot.py
5+
pcb/gerber_to_order

hackpads/playbackpad/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Playbackpad
2+
3+
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>.
4+
5+
## PCB
6+
7+
I quite enjoyed the PCB making process even though it was painful to find libraries for the OLED so I didn't use it.
8+
9+
Schematics | PCB
10+
:--------: | :-:
11+
![Schematics](images/kicad_f89OjKkaKC.png) | ![PCB](images/kicad_zTUGdFkLCO.png)
12+
13+
## CAD
14+
15+
Made the casing with Fusion 360, quite painful to make the holes ngl 💀🙏
16+
17+
![Casing](images/307d369a-21b9-4ea1-92bc-5f00588191d4.jpg)
18+
19+
## Firmware
20+
21+
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.
22+
23+
## BOM
24+
25+
- 3 Cherry MX switches
26+
- 3 Black Blank DSA keycaps
27+
- 4 M3x0.5x16 mm screws
28+
- 1 Seeed XIAO RP2040
29+
- 3D printed case

hackpads/playbackpad/cad/design.step

Lines changed: 48346 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import board
2+
import digitalio
3+
from kmk.kmk_keyboard import KMKKeyboard
4+
from kmk.keys import KC
5+
from kmk.modules.encoder import EncoderHandler
6+
from kmk.extensions.media_keys import MediaKeys
7+
8+
keyboard = KMKKeyboard()
9+
encoder_handler = EncoderHandler()
10+
encoder_handler.pins = ((board.GP0, board.GP29, board.GP3),)
11+
encoder_handler.map = [((KC.AUDIO_VOL_DOWN, KC.VOL_UP), KC.AUDIO_MUTE)]
12+
encoder_handler.acceleration_interval = 100
13+
keyboard.modules = [MediaKeys(), encoder_handler]
14+
15+
keyboard.keymap = [
16+
[
17+
KC.MEDIA_PREVIOUS_TRACK,
18+
KC.MEDIA_PLAY_PAUSE,
19+
KC.MEDIA_NEXT_TRACK
20+
]
21+
]
22+
23+
keyboard.gpio_pins = [board.GP4, board.GP2, board.GP1]
24+
25+
for pin in keyboard.gpio_pins:
26+
btn = digitalio.DigitalInOut(pin)
27+
btn.direction = digitalio.Direction.INPUT
28+
btn.pull = digitalio.Pull.UP
29+
30+
if __name__ == '__main__':
31+
keyboard.go()
33.1 KB
Loading
35 KB
Loading
94.8 KB
Loading

0 commit comments

Comments
 (0)