Skip to content
Open
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
14,351 changes: 14,351 additions & 0 deletions hackpads/Cael's HackPad/CAD/HackPad 98x98 BOTTOM.step

Large diffs are not rendered by default.

4,019 changes: 4,019 additions & 0 deletions hackpads/Cael's HackPad/CAD/HackPad 98x98 TOP.step

Large diffs are not rendered by default.

82,651 changes: 82,651 additions & 0 deletions hackpads/Cael's HackPad/CAD/HackPad FULL PREVIEW.step

Large diffs are not rendered by default.

26,916 changes: 26,916 additions & 0 deletions hackpads/Cael's HackPad/CAD/board_model.step

Large diffs are not rendered by default.

46 changes: 46 additions & 0 deletions hackpads/Cael's HackPad/Firmware/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import board
from kmk.modules.oled import SSD1306
from kmk.extensions import KMKeyboard
from kmk.scanners import DiodeOrientation
from kmk.keys import KC
import analogio

keyboard = KMKKeyboard()

# Matrix setup
keyboard.col_pins = [board.GPIO4, board.GPIO2, board.GPIO1]
keyboard.row_pins = [board.GPB5, board.GPB6, board.GPB7]
keyboard.diode_orientation = DiodeOrientation.COL2ROW

# Slider setup
slider1 = analogio.AnalogIn(board.GPIO26)
slider2 = analogio.AnalogIn(board.GPIO27)

# OLED setup
oled1306 = SSD1306(
i2c_addr=0x3C, i2c_device=board.I2C(scl=board.GPIO7, sda=board.GPIO6)
)


# gets the % position of the slider
def get_slider_percent(slider):
return int((slider.value * 100) / 65535)


# puts the slider % on the screen
def oled_update(oled):
oled.fill()
oled.text(f"{get_slider_percent(slider1)}%", 0, 0)
oled.text(f"{get_slider_percent(slider2)}%", 0, 10)
oled.show()


keyboard.modules.append(oled1306)
keyboard.keymap = [[KC.Q, KC.W, KC.E, KC.A, KC.S, KC.D, KC.Z, KC.X, KC.C]]

# once I have it physically I'm going to have the sliders adjust mic & spotify volumes respectively, and the buttons will be either for a mini keyboard or mute/unmute/play/pause hotkeys
# for now, this will just ensure that the pin layouts are working as intended and the connections are correct
# the volume control will probably need a script running in the pc itself but that's ok!

if __name__ == "__main__":
keyboard.go()
Binary file added hackpads/Cael's HackPad/PCB/Gerbers.zip
Binary file not shown.
1 change: 1 addition & 0 deletions hackpads/Cael's HackPad/PCB/hackpad-bottom-pos.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Ref,Val,Package,PosX,PosY,Rot,Side
28 changes: 28 additions & 0 deletions hackpads/Cael's HackPad/PCB/hackpad-top-pos.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Ref,Val,Package,PosX,PosY,Rot,Side
"D1","SK6812MINI","LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mm",95.881250,-55.643750,0.000000,top
"D2","SK6812MINI","LED_SK6812MINI_PLCC4_3.5x3.5mm_P1.75mm",95.881250,-60.406250,0.000000,top
"D3","D","D_DO-35_SOD27_P7.62mm_Horizontal",104.775000,-99.060000,90.000000,top
"D4","D","D_DO-35_SOD27_P7.62mm_Horizontal",123.825000,-99.060000,90.000000,top
"D5","D","D_DO-35_SOD27_P7.62mm_Horizontal",142.875000,-99.060000,90.000000,top
"D6","D","D_DO-35_SOD27_P7.62mm_Horizontal",104.775000,-118.110000,90.000000,top
"D7","D","D_DO-35_SOD27_P7.62mm_Horizontal",123.793077,-118.200054,90.000000,top
"D8","D","D_DO-35_SOD27_P7.62mm_Horizontal",142.875000,-118.110000,90.000000,top
"D9","D","D_DO-35_SOD27_P7.62mm_Horizontal",142.875000,-137.160000,90.000000,top
"D10","D","D_DO-35_SOD27_P7.62mm_Horizontal",123.877047,-137.177225,90.000000,top
"D11","D","D_DO-35_SOD27_P7.62mm_Horizontal",104.568539,-136.761167,90.000000,top
"J1","OLED_128x64","Adafruit_SSD1306",155.416250,-56.702500,0.000000,top
"R1","PTA4543-2015DPB103","BOURNS-PTA4543_45mm-slide-pot",158.464174,-114.230737,90.000000,top
"R2","PTA4543-2015DPB103","BOURNS-PTA4543_45mm-slide-pot",170.182623,-114.342696,90.000000,top
"R3","R","R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal",107.156250,-73.818750,0.000000,top
"R4","R","R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal",107.156250,-69.056250,0.000000,top
"SW1","SW_Push","SW_Cherry_MX_1.00u_PCB",97.790000,-90.170000,0.000000,top
"SW2","SW_Push","SW_Cherry_MX_1.00u_PCB",116.840000,-90.170000,0.000000,top
"SW3","SW_Push","SW_Cherry_MX_1.00u_PCB",135.890000,-90.170000,0.000000,top
"SW4","SW_Push","SW_Cherry_MX_1.00u_PCB",97.790000,-109.220000,0.000000,top
"SW5","SW_Push","SW_Cherry_MX_1.00u_PCB",116.840000,-109.220000,0.000000,top
"SW6","SW_Push","SW_Cherry_MX_1.00u_PCB",135.890000,-109.220000,0.000000,top
"SW7","SW_Push","SW_Cherry_MX_1.00u_PCB",97.790000,-128.270000,0.000000,top
"SW8","SW_Push","SW_Cherry_MX_1.00u_PCB",116.840000,-128.270000,0.000000,top
"SW9","SW_Push","SW_Cherry_MX_1.00u_PCB",135.890000,-128.270000,0.000000,top
"U1","XIAO-RP2040-DIP","XIAO-RP2040-DIP",126.206250,-61.912500,0.000000,top
"U2","MCP23017_SO","SOIC-28W_7.5x17.9mm_P1.27mm",97.743750,-73.501250,0.000000,top
Loading