bi gupdate
|
|
@ -12,7 +12,7 @@ i want to leave the PCB exposed, so i made a stand that can be attached to the P
|
|||
|
||||
the 8 keys (and secret 9th rotary encoder key) are addressed via a 3x3 key matrix, using only 6 pins of the RP2040.
|
||||

|
||||
this pcb was incredibly annoying to route the first time around. i rerouted it after reading some pcb tips and it turned out... better. i think.
|
||||
this is the third iteration of the PCB.
|
||||

|
||||
|
||||
## BOM
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 804 KiB After Width: | Height: | Size: 1 MiB |
|
Before Width: | Height: | Size: 576 KiB After Width: | Height: | Size: 550 KiB |
|
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 263 KiB |
|
|
@ -1,31 +1,38 @@
|
|||
# You import all the IOs of your board
|
||||
import board
|
||||
|
||||
# These are imports from the kmk library
|
||||
import busio
|
||||
from kmk.kmk_keyboard import KMKKeyboard
|
||||
from kmk.scanners import DiodeOrientation
|
||||
from kmk.keys import KC
|
||||
from kmk.modules.macros import Press, Release, Tap, Macros
|
||||
from kmk.modules.encoder import EncoderHandler
|
||||
from kmk.extensions.display import Display, TextEntry, ImageEntry
|
||||
from kmk.extensions.display.ssd1306 import SSD1306
|
||||
from kmk.extensions.RGB import RGB
|
||||
|
||||
# This is the main instance of your keyboard
|
||||
keyboard = KMKKeyboard()
|
||||
|
||||
# Add the macro extension
|
||||
macros = Macros()
|
||||
keyboard.modules.append(macros)
|
||||
encoder = EncoderHandler()
|
||||
encoder_handler.pins = ((board.SCK, board.RX, None,),)
|
||||
encoder_handler.map = [((KC.VOLD, KC.VOLU, KC.NO,),)]
|
||||
keyboard.modules.append(encoder)
|
||||
|
||||
# Define your pins here!
|
||||
keyboard.col_pins = (board.A0, board.A1, board.A2)
|
||||
keyboard.row_pins = (board.A3, board.MISO, board.MOSI)
|
||||
i2c_bus = busio.I2C(board.SCL, board.SDA)
|
||||
display_driver = SSD1306(i2c=i2c_bus)
|
||||
display = Display(display=display_driver)
|
||||
display.entries = [
|
||||
ImageEntry(image="pfptiny.bmp", x=0, y=0),
|
||||
TextEntry(text="bfpad", x=40, y=16, y_anchor="M")
|
||||
]
|
||||
keyboard.extensions.append(display)
|
||||
|
||||
rgb = RGB(pixel_pin = board.TX, num_pixels=11)
|
||||
keyboard.extensions.append(rgb)
|
||||
|
||||
keyboard.col_pins = (board.MOSI, board.A0, board.MISO)
|
||||
keyboard.row_pins = (board.A3, board.A2, board.A1)
|
||||
keyboard.diode_orientation = DiodeOrientation.COL2ROW
|
||||
|
||||
# Here you define the buttons corresponding to the pins
|
||||
# Look here for keycodes: https://github.com/KMKfw/kmk_firmware/blob/main/docs/en/keycodes.md
|
||||
# And here for macros: https://github.com/KMKfw/kmk_firmware/blob/main/docs/en/macros.md
|
||||
keyboard.keymap = [
|
||||
[[KC.RABK, KC.DOT, KC.COMMA], [KC.LABK, KC.PLUS, KC.LBRACKET], [KC.MINUS, KC.NO, KC.RBRACKET]]
|
||||
[[KC.RABK, KC.DOT, KC.COMMA], [KC.LABK, KC.PLUS, KC.LBRACKET], [KC.MINUS, KC.MUTE, KC.RBRACKET]]
|
||||
]
|
||||
|
||||
# Start kmk!
|
||||
if __name__ == '__main__':
|
||||
keyboard.go()
|
||||
BIN
hackpads/bfpad/firmware/kmk/pfptiny.bmp
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"board": {
|
||||
"active_layer": 0,
|
||||
"active_layer": 2,
|
||||
"active_layer_preset": "",
|
||||
"auto_track_width": true,
|
||||
"hidden_netclasses": [],
|
||||
|
|
|
|||
|
|
@ -51,7 +51,13 @@
|
|||
"min_clearance": 0.5
|
||||
}
|
||||
},
|
||||
"diff_pair_dimensions": [],
|
||||
"diff_pair_dimensions": [
|
||||
{
|
||||
"gap": 0.0,
|
||||
"via_gap": 0.0,
|
||||
"width": 0.0
|
||||
}
|
||||
],
|
||||
"drc_exclusions": [],
|
||||
"meta": {
|
||||
"version": 2
|
||||
|
|
@ -180,7 +186,9 @@
|
|||
"td_width_to_size_filter_ratio": 0.9
|
||||
}
|
||||
],
|
||||
"track_widths": [],
|
||||
"track_widths": [
|
||||
0.0
|
||||
],
|
||||
"tuning_pattern_settings": {
|
||||
"diff_pair_defaults": {
|
||||
"corner_radius_percentage": 80,
|
||||
|
|
@ -207,7 +215,12 @@
|
|||
"spacing": 0.6
|
||||
}
|
||||
},
|
||||
"via_dimensions": [],
|
||||
"via_dimensions": [
|
||||
{
|
||||
"diameter": 0.0,
|
||||
"drill": 0.0
|
||||
}
|
||||
],
|
||||
"zones_allow_external_fillets": false
|
||||
},
|
||||
"ipc2581": {
|
||||
|
|
@ -412,10 +425,15 @@
|
|||
"duplicate_sheet_names": "error",
|
||||
"endpoint_off_grid": "warning",
|
||||
"extra_units": "error",
|
||||
"footprint_filter": "ignore",
|
||||
"footprint_link_issues": "warning",
|
||||
"four_way_junction": "ignore",
|
||||
"global_label_dangling": "warning",
|
||||
"hier_label_mismatch": "error",
|
||||
"label_dangling": "error",
|
||||
"label_multiple_wires": "warning",
|
||||
"lib_symbol_issues": "warning",
|
||||
"lib_symbol_mismatch": "warning",
|
||||
"missing_bidi_pin": "warning",
|
||||
"missing_input_pin": "warning",
|
||||
"missing_power_pin": "error",
|
||||
|
|
@ -428,9 +446,14 @@
|
|||
"pin_not_driven": "error",
|
||||
"pin_to_pin": "warning",
|
||||
"power_pin_not_driven": "error",
|
||||
"same_local_global_label": "warning",
|
||||
"similar_label_and_power": "warning",
|
||||
"similar_labels": "warning",
|
||||
"similar_power": "warning",
|
||||
"simulation_model_issue": "ignore",
|
||||
"single_global_label": "ignore",
|
||||
"unannotated": "error",
|
||||
"unconnected_wire_endpoint": "warning",
|
||||
"unit_value_mismatch": "error",
|
||||
"unresolved_variable": "error",
|
||||
"wire_dangling": "error"
|
||||
|
|
@ -542,6 +565,7 @@
|
|||
],
|
||||
"filter_string": "",
|
||||
"group_symbols": true,
|
||||
"include_excluded_from_bom": false,
|
||||
"name": "Grouped By Value",
|
||||
"sort_asc": true,
|
||||
"sort_field": "Reference"
|
||||
|
|
@ -576,6 +600,7 @@
|
|||
"net_format_name": "",
|
||||
"page_layout_descr_file": "",
|
||||
"plot_directory": "",
|
||||
"space_save_all_events": true,
|
||||
"spice_current_sheet_as_root": false,
|
||||
"spice_external_command": "spice \"%I\"",
|
||||
"spice_model_current_sheet_as_root": true,
|
||||
|
|
|
|||