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
33 changes: 33 additions & 0 deletions hackpads/redScorpe's Numpad/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# redScorpe's Numpad

This is my custom version of a simple numpad with a Rotary Encoder and a 9.1" OLED-Display. Since I have recently switched to a TKL-Keyboard to easier switch between mouse and keyboard I wondered how cool it would be to have an external numpad which also has a rotary which my new keyboard is missing.

# Challenges
I was genuinely confused about a lot things regarding the whole process of building my first hackpad since all of this was new to me. However making my own symbol in KiCad for the OLED directly at the start of this journey was honestly the most challenging part for me.

## CAD Model
| **Model** | **Render** |
|----------------------------------------------------------------------------|-------------------------------------------------------------------------|
| ![](https://cdn.hackclubber.dev/slackcdn/a9e1c880677854b64dbcdd8c9dc36e76.png) | ![](https://cdn.hack.pet/slackcdn/678d118c57094d6aae49122bccd28d9b.PNG) |

## PCB
| **Schematic** | **PCB** |
|---------------|---------|
|![](https://cdn.hack.pet/slackcdn/a3ad7a5903431038cb79955e694afb3e.png)|![](https://cdn.hack.pet/slackcdn/e540ac6891c7700b64d7c771695121bb.png)|

## Third-Party KiCad Libraries
- https://github.com/kiswitch/kiswitch/tree/main/library/footprints/Switch_Keyboard_Cherry_MX.pretty
- https://github.com/Seeed-Studio/OPL_Kicad_Library


## BOM
- 1 Seeed Studio XIAO RP2040
- 12x MX-Style Switches
- 12x DSA Keycaps
- 12x 1N4148 Diodes
- 1x 0.91" 128x32 OLED Display
- 1x EC11 Rotary Encoder
- 4x M3x16mm Screws
- 4x M3x5mx4mm Heatset Inserts
- 1x 3d-Printed Case (Top, Middle and Bottom Parts)
- 1x [3d-Printed Knob](https:/ /makerworld.com/en/models/628840#profileId-593261)
Binary file added hackpads/redScorpe's Numpad/assets/img_1.png
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.
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.
176,270 changes: 176,270 additions & 0 deletions hackpads/redScorpe's Numpad/cad/redScorpe's_numpad.step

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions hackpads/redScorpe's Numpad/firmware/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import board
import digitalio
import rotaryio
import time
from kmk.kmk_keyboard import KMKKeyboard
from kmk.scanners.keypad import MatrixScanner
from kmk.keys import KC
from kmk.modules.encoder import EncoderHandler
from kmk.extensions.OLED_Display import Oled,OledDisplayMode

keyboard = KMKKeyboard()

keyboard.matrix = MatrixScanner(
cols=[board.GP1, board.GP2, board.GP3],
rows=[board.GP26, board.GP27, board.GP28, board.GP29],
diodes=True
)

keyboard.keymap = [
[KC.N7, KC.N8, KC.N9,
KC.N4, KC.N5, KC.N6,
KC.N1, KC.N2, KC.N3,
KC.N0, KC.DOT, KC.ENT]
]

encoder = EncoderHandler()
encoder.pins = (board.GP0, board.GP4)
encoder.on_clockwise = KC.VOLU
encoder.on_counterclockwise = KC.VOLD
keyboard.modules.append(encoder)

oled = Oled(oled_type=OledDisplayMode.IMAGE, flip=False)
keyboard.extensions.append(oled)

def render_animation(oled):
animation = [
0b00011000, 0b00111100, 0b01111110, 0b11111111,
0b01111110, 0b00111100, 0b00011000, 0b00000000,
]
oled.image(animation)

oled.display_function = render_animation

if __name__ == '__main__':
keyboard.go()
Loading