Merge branch 'hackclub:main' into main

This commit is contained in:
Harshit Jagarlamudi 2024-10-21 16:40:40 +01:00 committed by GitHub
commit bcf9439325
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 24219 additions and 0 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Binary file not shown.
1 ID Name Designator Footprint Quantity Manufacturer Part Manufacturer Supplier Supplier Part Price
2 1 23-21UYOC/S530-A3/TR8 LED1,LED2,LED3,LED4 LED-SMD_L3.2-W1.6-FD_EH 4 23-21UYOC/S530-A3/TR8 EVERLIGHT(亿光) LCSC C264537 0.046
3 2 150Ω R1,R2,R3,R4 RES-TH_BD2.7-L6.2-P10.20-D0.4 4 MF1/4W-150Ω±1%-ST52 VO(翔胜) LCSC C2903242 0.004
4 3 Seeed XIAO RP2040 U1 SEEED XIAO 1 102010428 Seeedstudio
5 4 1N4007W D1,D2,D3,D4,D5,D6,D7,D11,D12 SOD-123_L2.8-W1.8-LS3.7-RD 9 1N4007W 晶导微电子 LCSC C108803
6 5 HS91L02W2C01 OLED1 OLED-TH_L38.0-W12.0_HS91L02W2C01 1 HS91L02W2C01 HS(汉昇) LCSC C5248081 2.177
7 6 CHERRY_CHERRY_MX S1,S2,S3,S6,S7,S8,S9,S10,S11 CHERRY 9
8 7 PEC11R-4215F-S0024 SW1 SW-TH_5P-L12.5-W13.4-P2.50-LS14.5 1 PEC11R-4215F-S0024 BOURNS LCSC C143790 2.395

File diff suppressed because it is too large Load diff

View 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!
![](https://cloud-362soi2pi-hack-club-bot.vercel.app/0image.png)
![](https://cloud-362soi2pi-hack-club-bot.vercel.app/1image.png)
![](https://cloud-362soi2pi-hack-club-bot.vercel.app/2image.png)
![](https://cloud-362soi2pi-hack-club-bot.vercel.app/3image.png)
![](https://cloud-362soi2pi-hack-club-bot.vercel.app/4image.png)

View 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()