mirror of
https://github.com/System-End/hackpad.git
synced 2026-04-19 19:55:15 +00:00
Okay maybe final commit
This commit is contained in:
parent
693d258a58
commit
001b832462
8 changed files with 27894 additions and 0 deletions
27735
hackpads/ChadPad/CAD/HackPad v0.step
Normal file
27735
hackpads/ChadPad/CAD/HackPad v0.step
Normal file
File diff suppressed because it is too large
Load diff
BIN
hackpads/ChadPad/PCB/gerbers.zip
Normal file
BIN
hackpads/ChadPad/PCB/gerbers.zip
Normal file
Binary file not shown.
29
hackpads/ChadPad/README.md
Normal file
29
hackpads/ChadPad/README.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
## ChadPad Macropad
|
||||
This is my submission for the HackPad YSWS event. I have to admit, the design is lacking and could be way more polished, but I learned about HackPad 3 days before the submission date and therefore had a limited amount of time.
|
||||
|
||||
The ChadPad includes 9x Choc V2 switches, each with its own SK6812 MINI LED for backlighting. There are also 4 additional RGB LEDs which can be programmed as indicators (Show if user is muted, deafened, etc.). The case includes channels which guide the light from the indicator LEDs to the top panel, with the idea that 3D printed icons can be inserted into the slots, and lit up by the LEDs. The current firmware has limited support for the LEDs, which will be rectified when I am able to debug it with the physical device.
|
||||
|
||||
Im quite happy with how the design turned out, despite its shortcomings. If I had more time to work on it, I would definitely improve the case (I´ll probably print an improved version) and the firmware (Honestly I have no clue whether it will work or not, its quite hard to write firmware that you cant test). In hindsight, changing the switch layout to a matrix type would also be an improvement.
|
||||
|
||||
## PCB Screenshots
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Case and instructions
|
||||
|
||||

|
||||

|
||||
|
||||
## BILL OF MATERIALS
|
||||
9x Choc V2 switches (ideally blue but does not really matter)
|
||||
9x White 1U DSA keycaps
|
||||
13x SK6812 MINI-E LEDs
|
||||
1x SEEED XIAO RP2040
|
||||
1x 3D printed case (ideally white, black also works)
|
||||
1x PCB (ideally purple or black)
|
||||
|
||||
|
||||
## DISCLAIMER
|
||||
Even though the submission requirements ask that DRC runs without issues, for some reason it complains about clearance on the XIAO pins, this is not an issue that would affect the function of the PCB, it is most likely an issue with me modifying the footprint and messing something up. If you do run DRC on the PCB, please ignore the XIAO pad errors. I attempted to fix it, but unfortunately I was unsuccessful.
|
||||
65
hackpads/ChadPad/firmware/firmware.py
Normal file
65
hackpads/ChadPad/firmware/firmware.py
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
import board
|
||||
import digitalio
|
||||
import adafruit_hid.keycode
|
||||
from adafruit_hid.keyboard import Keyboard
|
||||
import neopixel
|
||||
import time
|
||||
|
||||
buttons = [
|
||||
digitalio.DigitalInOut(board.P26),
|
||||
digitalio.DigitalInOut(board.P7),
|
||||
digitalio.DigitalInOut(board.P3),
|
||||
digitalio.DigitalInOut(board.P27),
|
||||
digitalio.DigitalInOut(board.P29),
|
||||
digitalio.DigitalInOut(board.P4),
|
||||
digitalio.DigitalInOut(board.P28),
|
||||
digitalio.DigitalInOut(board.P1),
|
||||
digitalio.DigitalInOut(board.P2),
|
||||
]
|
||||
|
||||
for button in buttons:
|
||||
button.switch_to_input(pull=digitalio.Pull.UP)
|
||||
|
||||
|
||||
num_pixels = 13
|
||||
pixels = neopixel.NeoPixel(board.D4, num_pixels, brightness=0.2, auto_write=False)
|
||||
|
||||
|
||||
keyboard = Keyboard()
|
||||
|
||||
|
||||
def set_led_color(index, color):
|
||||
pixels[index] = color
|
||||
pixels.show()
|
||||
|
||||
while True:
|
||||
for i, button in enumerate(buttons):
|
||||
if not button.value:
|
||||
if i == 0:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.7)
|
||||
elif i == 1:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.8)
|
||||
elif i == 2:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.9)
|
||||
elif i == 3:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.4)
|
||||
elif i == 4:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.5)
|
||||
elif i == 5:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.6)
|
||||
elif i == 6:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.1)
|
||||
elif i == 7:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.2)
|
||||
elif i == 8:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.3)
|
||||
|
||||
set_led_color(i, (255, 0, 0))
|
||||
|
||||
time.sleep(0.1)
|
||||
keyboard.release_all()
|
||||
|
||||
else:
|
||||
set_led_color(i, (0, 0, 0))
|
||||
|
||||
time.sleep(0.01)
|
||||
BIN
hackpads/ChadPad/production/BOT.stl
Normal file
BIN
hackpads/ChadPad/production/BOT.stl
Normal file
Binary file not shown.
BIN
hackpads/ChadPad/production/TOP.stl
Normal file
BIN
hackpads/ChadPad/production/TOP.stl
Normal file
Binary file not shown.
65
hackpads/ChadPad/production/firmware.py
Normal file
65
hackpads/ChadPad/production/firmware.py
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
import board
|
||||
import digitalio
|
||||
import adafruit_hid.keycode
|
||||
from adafruit_hid.keyboard import Keyboard
|
||||
import neopixel
|
||||
import time
|
||||
|
||||
buttons = [
|
||||
digitalio.DigitalInOut(board.P26),
|
||||
digitalio.DigitalInOut(board.P7),
|
||||
digitalio.DigitalInOut(board.P3),
|
||||
digitalio.DigitalInOut(board.P27),
|
||||
digitalio.DigitalInOut(board.P29),
|
||||
digitalio.DigitalInOut(board.P4),
|
||||
digitalio.DigitalInOut(board.P28),
|
||||
digitalio.DigitalInOut(board.P1),
|
||||
digitalio.DigitalInOut(board.P2),
|
||||
]
|
||||
|
||||
for button in buttons:
|
||||
button.switch_to_input(pull=digitalio.Pull.UP)
|
||||
|
||||
|
||||
num_pixels = 13
|
||||
pixels = neopixel.NeoPixel(board.D4, num_pixels, brightness=0.2, auto_write=False)
|
||||
|
||||
|
||||
keyboard = Keyboard()
|
||||
|
||||
|
||||
def set_led_color(index, color):
|
||||
pixels[index] = color
|
||||
pixels.show()
|
||||
|
||||
while True:
|
||||
for i, button in enumerate(buttons):
|
||||
if not button.value:
|
||||
if i == 0:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.7)
|
||||
elif i == 1:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.8)
|
||||
elif i == 2:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.9)
|
||||
elif i == 3:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.4)
|
||||
elif i == 4:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.5)
|
||||
elif i == 5:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.6)
|
||||
elif i == 6:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.1)
|
||||
elif i == 7:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.2)
|
||||
elif i == 8:
|
||||
keyboard.press(adafruit_hid.keycode.Keycode.3)
|
||||
|
||||
set_led_color(i, (255, 0, 0))
|
||||
|
||||
time.sleep(0.1)
|
||||
keyboard.release_all()
|
||||
|
||||
else:
|
||||
set_led_color(i, (0, 0, 0))
|
||||
|
||||
time.sleep(0.01)
|
||||
BIN
hackpads/ChadPad/production/gerbers.zip
Normal file
BIN
hackpads/ChadPad/production/gerbers.zip
Normal file
Binary file not shown.
Loading…
Add table
Reference in a new issue