Skip to content
Merged
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
29 changes: 29 additions & 0 deletions hackpads/bfpad/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# bfpad

bfpad is an 8-key macropad with an additional 0.91 inch 128x32 OLED display and an EC11 rotary encoder. there are 3 reverse-mount neopixels to light under the keys, as well as 8 under the board. with limited keys on the pad, i figured interpreting a limited-character and simple language directly on the microcontroller would be a perfect fit. the goal is to write firmware to allow you to write and run [bf](https://en.wikipedia.org/wiki/Brainfuck) code directly on the keyboard. hopefully.
![bfpad](assets/bfpad.png)

## case

i want to leave the PCB exposed, so i made a stand that can be attached to the PCB via m3 screws and held in place by hex nuts.
![case](assets/case.png)

## schematic & pcb

the 8 keys (and secret 9th rotary encoder key) are addressed via a 3x3 key matrix, using only 6 pins of the RP2040.
![schematic](assets/schematic.png)
this is the third iteration of the PCB.
![pcb](assets/pcb.png)

## BOM

- Seeed XIAO RP2040 (through-hole)
- 8x kailh choc v2 switches (and corresponding keycaps! any color)
- 9x 1N4148 DO-35 Diodes
- 1x EC11 rotary encoder
- 1x 0.91 inch OLED SSD1306 display
- 8x SK6812 MINI LEDs
- 3x SK6812 MINI-E reverse mount LEDs
- 3x M3 screws
- 9x M3 hex nuts
- 1x bottom stand
Binary file added hackpads/bfpad/assets/bfpad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackpads/bfpad/assets/case.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackpads/bfpad/assets/pcb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hackpads/bfpad/assets/schematic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116,300 changes: 116,300 additions & 0 deletions hackpads/bfpad/cad/hackpad_full.step

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions hackpads/bfpad/firmware/kmk/firmware.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import board
import busio
from kmk.kmk_keyboard import KMKKeyboard
from kmk.scanners import DiodeOrientation
from kmk.keys import KC
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

keyboard = KMKKeyboard()

encoder = EncoderHandler()
encoder_handler.pins = ((board.SCK, board.RX, None,),)
encoder_handler.map = [((KC.VOLD, KC.VOLU, KC.NO,),)]
keyboard.modules.append(encoder)

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
keyboard.keymap = [
[[KC.RABK, KC.DOT, KC.COMMA], [KC.LABK, KC.PLUS, KC.LBRACKET], [KC.MINUS, KC.MUTE, KC.RBRACKET]]
]

if __name__ == '__main__':
keyboard.go()
Binary file added hackpads/bfpad/firmware/kmk/pfptiny.bmp
Binary file not shown.
8 changes: 8 additions & 0 deletions hackpads/bfpad/pcb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cheyao macropad main PCB-third_party_neopixel.petty
KiCad-SSD1306-0.91-OLED-4pin-128x32.pretty-master
OPL_Kicad_Library-master
fp-info-cache
fp-lib-table
sym-lib-table
~hackpad.kicad_sch.lck
~hackpad.kicad_pcb.lck
5,386 changes: 5,386 additions & 0 deletions hackpads/bfpad/pcb/3dmodels/Encoder EC11E Alps.step

Large diffs are not rendered by default.

Loading