Model originally uploaded to Thingiverse at https://www.thingiverse.com/thing:3815645.
OverviewErgonomic case for 3x4 or 4x4 membrane keypad to be used for 3D Printer Controls. All parts were printed in ABS except for KeypadBottom printed in TPU for grip. Print each file once and assemble. I'm using this connected directly to the Raspberry Pi GPIO pins with no additional electronics. I wrote an Octoprint plugin to interface with my printer, but my Python skills are limited and do not have full customization built into the plug-in yet.
Hardware Required:- 4x M3 Heat-Set Inserts
- 4x M3 x 8-10mm Cap Head Screws
- 3x4 or 4x4 Membrane Keypad
- CAT6 or CAT5E (Sacrificed Patch cable recommended for more flexible cable)
- Male-Male Header Pins
- 2.54mm Single Row Female Headers (7-pin for 3x4, 8-pin for 4x4)
-
Not currently in the Octoprint Plug-In Repository, needs Python 3 conversion, which shouldn't be a problem I just haven't had the time. If anyone likes this idea and has the skills feel free to take it over or branch it.
-
Download Github repository and put into a folder called Octoprint-MembraneKeypad in your Octoprint plug-ins folder
-
Once installed after restarting Octoprint you can find in the Settings page > Advanced options to change the default raspberry pi pins used by the keypad (just in case you are already using these pins for something else)
-
Requires RPi.GPIO and pad4pi python libraries installed by:
- pip install RPi.GPIO
- pip install pad4pi
-
You can change the functionality or keys used for each function in init.py under "def pressKey(self, key)" by changing if key == 6: for example to a different number or symbol corresponding to the keypad.
-
It should be possible to change to a 4x4 matrix keypad by finding and replacing in init.py:
- 4/25/2020: Updated GitHub repository, added instructions for testing plug-in