Skip to content

Commit ed481ac

Browse files
authored
Merge pull request #527 from thonkinator/main
bfpad submission
2 parents 6684fcf + ee2e90a commit ed481ac

20 files changed

+228938
-0
lines changed

hackpads/bfpad/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# bfpad
2+
3+
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.
4+
![bfpad](assets/bfpad.png)
5+
6+
## case
7+
8+
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.
9+
![case](assets/case.png)
10+
11+
## schematic & pcb
12+
13+
the 8 keys (and secret 9th rotary encoder key) are addressed via a 3x3 key matrix, using only 6 pins of the RP2040.
14+
![schematic](assets/schematic.png)
15+
this is the third iteration of the PCB.
16+
![pcb](assets/pcb.png)
17+
18+
## BOM
19+
20+
- Seeed XIAO RP2040 (through-hole)
21+
- 8x kailh choc v2 switches (and corresponding keycaps! any color)
22+
- 9x 1N4148 DO-35 Diodes
23+
- 1x EC11 rotary encoder
24+
- 1x 0.91 inch OLED SSD1306 display
25+
- 8x SK6812 MINI LEDs
26+
- 3x SK6812 MINI-E reverse mount LEDs
27+
- 3x M3 screws
28+
- 9x M3 hex nuts
29+
- 1x bottom stand

hackpads/bfpad/assets/bfpad.png

1.01 MB
Loading

hackpads/bfpad/assets/case.png

1010 KB
Loading

hackpads/bfpad/assets/pcb.png

550 KB
Loading
263 KB
Loading

hackpads/bfpad/cad/hackpad_full.step

Lines changed: 116300 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import board
2+
import busio
3+
from kmk.kmk_keyboard import KMKKeyboard
4+
from kmk.scanners import DiodeOrientation
5+
from kmk.keys import KC
6+
from kmk.modules.encoder import EncoderHandler
7+
from kmk.extensions.display import Display, TextEntry, ImageEntry
8+
from kmk.extensions.display.ssd1306 import SSD1306
9+
from kmk.extensions.RGB import RGB
10+
11+
keyboard = KMKKeyboard()
12+
13+
encoder = EncoderHandler()
14+
encoder_handler.pins = ((board.SCK, board.RX, None,),)
15+
encoder_handler.map = [((KC.VOLD, KC.VOLU, KC.NO,),)]
16+
keyboard.modules.append(encoder)
17+
18+
i2c_bus = busio.I2C(board.SCL, board.SDA)
19+
display_driver = SSD1306(i2c=i2c_bus)
20+
display = Display(display=display_driver)
21+
display.entries = [
22+
ImageEntry(image="pfptiny.bmp", x=0, y=0),
23+
TextEntry(text="bfpad", x=40, y=16, y_anchor="M")
24+
]
25+
keyboard.extensions.append(display)
26+
27+
rgb = RGB(pixel_pin = board.TX, num_pixels=11)
28+
keyboard.extensions.append(rgb)
29+
30+
keyboard.col_pins = (board.MOSI, board.A0, board.MISO)
31+
keyboard.row_pins = (board.A3, board.A2, board.A1)
32+
keyboard.diode_orientation = DiodeOrientation.COL2ROW
33+
keyboard.keymap = [
34+
[[KC.RABK, KC.DOT, KC.COMMA], [KC.LABK, KC.PLUS, KC.LBRACKET], [KC.MINUS, KC.MUTE, KC.RBRACKET]]
35+
]
36+
37+
if __name__ == '__main__':
38+
keyboard.go()
4.13 KB
Binary file not shown.

hackpads/bfpad/pcb/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cheyao macropad main PCB-third_party_neopixel.petty
2+
KiCad-SSD1306-0.91-OLED-4pin-128x32.pretty-master
3+
OPL_Kicad_Library-master
4+
fp-info-cache
5+
fp-lib-table
6+
sym-lib-table
7+
~hackpad.kicad_sch.lck
8+
~hackpad.kicad_pcb.lck

hackpads/bfpad/pcb/3dmodels/Encoder EC11E Alps.step

Lines changed: 5386 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)