Skip to content

Commit b523196

Browse files
Merge pull request #502 from jonhabba/main
Add T_UNSERHackpad
2 parents eca2557 + f01cad6 commit b523196

26 files changed

+221914
-0
lines changed
172 KB
Binary file not shown.
494 KB
Binary file not shown.
38.5 KB
Binary file not shown.
16.9 KB
Binary file not shown.
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import board
2+
import busio
3+
import displayio
4+
import terminalio
5+
import neopixel
6+
from kmk.kmk_keyboard import KMKKeyboard
7+
from kmk.keys import KC
8+
from kmk.modules.encoder import EncoderHandler
9+
from adafruit_display_text import label
10+
from adafruit_displayio_ssd1306 import SSD1306
11+
12+
# D0: Switch@Rotary encoder
13+
# D1: Rotary-Encoder output A
14+
# D3: Rotary-Encoder output B
15+
# D4: Display SDA
16+
# D5: Display SCL
17+
# D7: Switch 1
18+
# D8: Switch 2
19+
# D9: Switch 3
20+
# D10: Switch 4
21+
22+
keyboard = KMKKeyboard()
23+
24+
keyboard.col_pins = (board.D7, board.D8, board.D9, board.D10) # SW1-SW4
25+
keyboard.row_pins = ()
26+
27+
pixels = neopixel.NeoPixel(board.D6)
28+
pixels.fill(255,255,255)
29+
pixels.show()
30+
31+
encoder_handler = EncoderHandler()
32+
keyboard.modules.append(encoder_handler)
33+
encoder_handler.pins = ((board.D1, board.D2, board.D0),) # A, B, Switch
34+
encoder_handler.map = [
35+
((KC.VOLU, KC.VOLD), KC.MUTE)
36+
]
37+
keyboard.keymap = [
38+
[KC.N1, KC.N2, KC.N3, KC.N4]
39+
]
40+
41+
displayio.release_displays()
42+
i2c = busio.I2C(board.D5, board.D4)
43+
display_bus = displayio.I2CDisplay(i2c, device_address=0x3C)
44+
display = SSD1306(display_bus, width=128, height=64)
45+
46+
splash = displayio.Group()
47+
text_area = label.Label(terminalio.FONT, text="Keyboard", color=0xFFFFFF, x=10, y=10)
48+
splash.append(text_area)
49+
display.show(splash)
50+
51+
def update_display(message):
52+
text_area.text = message
53+
display.show(splash)
54+
55+
def on_keypress(key):
56+
update_display(f"Pressed: {key.name}")
57+
58+
keyboard.pressed_callbacks.append(on_keypress)
59+
60+
if __name__ == '__main__':
61+
keyboard.go()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
C:\Users\timka\Desktop\Programmieren_Priv\Hackpad\PCB-Design\_autosave-PCB-Design.kicad_sch
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
M48
2+
; DRILL file {KiCad 8.0.8} date 2025-02-14T01:40:04+0100
3+
; FORMAT={-:-/ absolute / metric / decimal}
4+
; #@! TF.CreationDate,2025-02-14T01:40:04+01:00
5+
; #@! TF.GenerationSoftware,Kicad,Pcbnew,8.0.8
6+
; #@! TF.FileFunction,NonPlated,1,2,NPTH
7+
FMAT,2
8+
METRIC
9+
; #@! TA.AperFunction,NonPlated,NPTH,ComponentDrill
10+
T1C1.700
11+
; #@! TA.AperFunction,NonPlated,NPTH,ComponentDrill
12+
T2C2.100
13+
; #@! TA.AperFunction,NonPlated,NPTH,ComponentDrill
14+
T3C4.000
15+
%
16+
G90
17+
G05
18+
T1
19+
X140.42Y-102.0
20+
X150.58Y-102.0
21+
X160.92Y-102.0
22+
X171.08Y-102.0
23+
X181.0Y-102.0
24+
X191.16Y-102.0
25+
X201.42Y-102.0
26+
X211.58Y-102.0
27+
T2
28+
X139.0Y-51.0
29+
X139.0Y-112.0
30+
X213.0Y-51.0
31+
X213.0Y-112.0
32+
T3
33+
X145.5Y-102.0
34+
X166.0Y-102.0
35+
X186.08Y-102.0
36+
X206.5Y-102.0
37+
M30
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
M48
2+
; DRILL file {KiCad 8.0.8} date 2025-02-14T01:40:04+0100
3+
; FORMAT={-:-/ absolute / metric / decimal}
4+
; #@! TF.CreationDate,2025-02-14T01:40:04+01:00
5+
; #@! TF.GenerationSoftware,Kicad,Pcbnew,8.0.8
6+
; #@! TF.FileFunction,Plated,1,2,PTH
7+
FMAT,2
8+
METRIC
9+
; #@! TA.AperFunction,Plated,PTH,ViaDrill
10+
T1C0.300
11+
; #@! TA.AperFunction,Plated,PTH,ComponentDrill
12+
T2C0.889
13+
; #@! TA.AperFunction,Plated,PTH,ComponentDrill
14+
T3C1.000
15+
; #@! TA.AperFunction,Plated,PTH,ComponentDrill
16+
T4C1.500
17+
%
18+
G90
19+
G05
20+
T1
21+
X148.0Y-109.0
22+
X155.0Y-83.0
23+
X163.0Y-82.0
24+
X168.0Y-110.0
25+
X169.0Y-85.0
26+
X179.0Y-71.0
27+
X180.0Y-51.0
28+
X181.0Y-71.0
29+
X182.0Y-75.0
30+
X183.0Y-71.0
31+
X185.0Y-71.0
32+
X186.039Y-81.961
33+
X187.039Y-82.961
34+
X188.0Y-71.0
35+
X188.0Y-110.0
36+
X191.0Y-68.0
37+
X192.0Y-51.0
38+
X192.0Y-62.0
39+
X192.0Y-65.0
40+
X193.0Y-84.0
41+
X209.0Y-109.0
42+
X212.0Y-59.0
43+
T2
44+
X178.38Y-50.88
45+
X178.38Y-53.42
46+
X178.38Y-55.96
47+
X178.38Y-58.5
48+
X178.38Y-61.04
49+
X178.38Y-63.58
50+
X178.38Y-66.12
51+
X193.62Y-50.88
52+
X193.62Y-53.42
53+
X193.62Y-55.96
54+
X193.62Y-58.5
55+
X193.62Y-61.04
56+
X193.62Y-63.58
57+
X193.62Y-66.12
58+
T3
59+
X157.08Y-51.05
60+
X159.62Y-51.05
61+
X162.16Y-51.05
62+
X164.7Y-51.05
63+
X197.75Y-65.0
64+
X197.75Y-67.5
65+
X197.75Y-70.0
66+
X212.25Y-65.0
67+
X212.25Y-70.0
68+
T4
69+
X141.69Y-99.46
70+
X148.04Y-96.92
71+
X162.19Y-99.46
72+
X168.54Y-96.92
73+
X182.27Y-99.46
74+
X188.62Y-96.92
75+
X202.69Y-99.46
76+
X209.04Y-96.92
77+
T4
78+
G00X204.6Y-61.9
79+
M15
80+
G01X205.9Y-61.9
81+
M16
82+
G05
83+
G00X204.6Y-73.1
84+
M15
85+
G01X205.9Y-73.1
86+
M16
87+
G05
88+
M30

0 commit comments

Comments
 (0)