HP-16C for hackers, who don't mind wasting CPU cycles and RAM for comfort.
- NeoKey 5x6 Ortho Snap-Apart Mechanical Key Switches - Finally a PCB with enough (but not too many) buttons!
- Black Adafruit Feather RP2040 - Less powerful boards will probably do the basic functionality but I wanted to make sure my OLED is nice
- Adafruit 128x64 OLED FeatherWing
- 20x MX compatible keyswitches and caps
- Screws: M2.5 for the FeatherWing, M3 for the keypad
- Incremental encoder with push button
- Male and female pin headers to connect the Feather with the display. Careful when following tutorials advising the use of breadboards for soldering: my breadboard didn't exactly match the distance of pin lines, making the headers tilt!
- Adafruit Macropad RP2040 - It took me a long time to realize, that these kinds of things are called "macropads" - a keyword that made googling for parts much easier!
- Numpad 4000 - A great project, but decimal is BORING!
The RP2040 Feather has 21 GPIO pins, I use 16:
- 9 for the keyboard (4x5)
- 2 for the display I2C
- 3 for the display buttons, 1 is in active use for the encoder switch
- 2 for the encoder
I cut out the base from 2mm plexi sheets (polystyrol, sold as "hobbyglas" - a perfect name for a product, that is not actually made of glass...), because they were the only fitting plastic material I could find available. It's transparent, which I think is pretty cool for this project.
Cutting the sheets is relatively easy using a razor tool, then snapping it.
The surface is really slippery, so be careful when measuring!
For drilling I used a 3mm masonry drill head in an electric screwdriver set on a relatively slow speed. This way I could avoid cracks, but had to pause multiple times to let the plastic resolidify and clean the head. I fixed multiple imprefect drills with a 4mm head.
I used an acrylic pen to draw signs on black plastic.
The basic idea is to have a reprogrammable numpad, and feed any input to Python's eval() to get results. This way basic and boolean arithmethic in multiple number systems are available out of the box.
[0-9A-F]+
- Hexadecimal (default)0D[0-9]+
- Decimal0B[01]+
- Binary0C[0-7]+
- Octal (sry, we don't have an 'o')
These can be set using the encoder.
- FORTUNE: This is the basic mode. Can add and subtract.
- MULTI:
+
->*
and-
->/
(division untested, pbbly will break things) - AND:
+
->&
and-
->|
- XOR: Both
+
and-
become^
- SHIFT:
+
-><<
and-
->>>
- DEC: Convert the currently displayed number to decimal (according to notation)
- BIN: Convert the currently displayed number to binary (according to notation)
- TWOS: Two's complement, because signed bytes in Java suck. This takes the currently displayed number as 8-bit_decimal and displays two's complement in hexadecimal!
I'm willing to offer a bottle of fine booze to anyone (original idea required) who demonstrates arbitrary Python code execution using the implemented functionality and the 20 available buttons!
- A proper box