mirror of
https://github.com/System-End/hackpad.git
synced 2026-04-19 21:05:15 +00:00
Merge branch 'hackclub:main' into main
This commit is contained in:
commit
bcf9439325
7 changed files with 24219 additions and 0 deletions
12686
hackpads/Swiftpad/CAD/3DShell_3DSHELL-SWIFTPAD_B.stl
Normal file
12686
hackpads/Swiftpad/CAD/3DShell_3DSHELL-SWIFTPAD_B.stl
Normal file
File diff suppressed because it is too large
Load diff
6974
hackpads/Swiftpad/CAD/3DShell_3DSHELL-SWIFTPAD_T.stl
Normal file
6974
hackpads/Swiftpad/CAD/3DShell_3DSHELL-SWIFTPAD_T.stl
Normal file
File diff suppressed because it is too large
Load diff
BIN
hackpads/Swiftpad/PCB/BOM_MACROPAD-2024-09-20.csv
Normal file
BIN
hackpads/Swiftpad/PCB/BOM_MACROPAD-2024-09-20.csv
Normal file
Binary file not shown.
|
Binary file not shown.
4470
hackpads/Swiftpad/PCB/Schematic.pdf
Normal file
4470
hackpads/Swiftpad/PCB/Schematic.pdf
Normal file
File diff suppressed because it is too large
Load diff
21
hackpads/Swiftpad/README.md
Normal file
21
hackpads/Swiftpad/README.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# SwiftPad: The Minimal Productivity Based Macropad?
|
||||
|
||||
Meet Swift, The most fastest way and the best way to get tasks done quicckkk!
|
||||
Swift is design for me to use it mainly with my iPad since it makes my workflow easier.
|
||||
|
||||
|
||||
## Swift Features:
|
||||
- A rotary Encoder! (with a built-in switch to change layers)
|
||||
- A OLED 0.91 inch screen! (Not too big but gets the job done)
|
||||
- 9 MX switches
|
||||
- 4 unused LEDS (for now)(Low powered single colored orange leds)
|
||||
- A TruchetTiles Pattern (Credits to created of Macroboard for the pattern)
|
||||
|
||||
Swift Pad runs on the KMK firmware which is built on python (the only language im confident in)
|
||||
## Images!
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
68
hackpads/Swiftpad/firmware/code.py
Normal file
68
hackpads/Swiftpad/firmware/code.py
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
'''
|
||||
SwiftPad
|
||||
'''
|
||||
import board
|
||||
import busio
|
||||
from kmk.kmk_keyboard import KMKKeyboard
|
||||
from kmk.keys import KC
|
||||
from kmk.scanners import DiodeOrientation
|
||||
from kmk.extensions.media_keys import MediaKeys
|
||||
from kmk.extensions.display import Display, TextEntry, ImageEntry
|
||||
from kmk.modules.encoder import EncoderHandler
|
||||
from kmk.extensions.display.ssd1306 import SSD1306
|
||||
|
||||
# Pinout
|
||||
COL1 = board.D3
|
||||
COL2 = board.D6
|
||||
COL3 = board.D7
|
||||
ROW1 = board.D0
|
||||
ROW2 = board.D1
|
||||
ROW3 = board.D2
|
||||
PUSHBUTTON = board.D8
|
||||
ROTA = board.D9
|
||||
ROTB = board.D10
|
||||
i2c_bus = busio.I2C(board.GP_SCL, board.GP_SDA)
|
||||
|
||||
driver = SSD1306(
|
||||
i2c=i2c_bus,
|
||||
device_address=0x3C,
|
||||
)
|
||||
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
#matrix settings
|
||||
keyboard.col_pins = (COL1, COL2, COL3)
|
||||
keyboard.row_pins = (ROW1, ROW2, ROW3)
|
||||
keyboard.diode_orientation = DiodeOrientation.COL2ROW
|
||||
|
||||
# Encoder settings
|
||||
encoder_handler = EncoderHandler()
|
||||
keyboard.modules.append(encoder_handler)
|
||||
encoder_handler.pins = ((ROTA, ROTB, PUSHBUTTON, False),)
|
||||
encoder_handler.map = (((KC.VOLD, KC.VOLU, KC.MUTE),),)
|
||||
|
||||
#Screen
|
||||
display = Display(
|
||||
display=display_driver,
|
||||
entries=[
|
||||
TextEntry(text='The Swift Pad: ', x=0, y=0, y_anchor='M'),
|
||||
],
|
||||
width=128,
|
||||
height=32,
|
||||
dim_time=10,
|
||||
dim_target=0.2,
|
||||
off_time=1200,
|
||||
brightness=1,
|
||||
)
|
||||
keyboard.extensions.append(display)
|
||||
|
||||
# Keymap
|
||||
keyboard.keymap = [
|
||||
[KC.LCTRL(KC.LSHIFT(KC.TAB)), KC.LCTRL(KC.M), KC.LCTRL(KC.TAB),
|
||||
KC.MEDIA_PREV_TRACK, KC.MEDIA_PLAY_PAUSE, KC.MEDIA_NEXT_TRACK,
|
||||
KC.LCTRL(KC.C), KC.LCTRL(KC.V), KC.LGUI(KC.SPACE),
|
||||
]
|
||||
]
|
||||
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
||||
Loading…
Add table
Reference in a new issue