RaspiElf Keypad
Intro
The Elf Membership Card has 8 data switches, 3 mode switches, and a IN push button on its front panel. The data is displayed on 8 LEDs (binary). It is a error prone but educational task to "switch in" in (load) the program.

I have an old external keypad because my old notebook did not have a numeric keypad. The keys looks similar to those old Elf hex keypads, why not use this spare keypad for the Elf Membership Card? It is a Cherry keyboard and I have other Cherry keyboard with the same key caps.

Hardware

gal 2000 G84-4700 2 persp.jpg
Cherry Keypad G84-4700, original key caps
LED module.jpg
LTP-305 Dot Matrix Display
Microdot pHAT.jpg
Microdot_pHAT on Raspberry Pi Zero

Software for the Raspberry Pi

No special software needed. Keyboard drivers are already built in.

Mapping scancodes to keycodes is universal and not specific to Linux console or Xorg, which means that changes to this mapping will be effective in both.

pi@cosmac:~/elf/RaspiElf/tools $ udevadm info /dev/input/by-path/*-usb-*-kbd
P: /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:046A:0014.0002/input/input1/event0
N: input/event0
S: input/by-id/usb-046a_0014-event-kbd
S: input/by-path/platform-3f980000.usb-usb-0:1.2:1.0-event-kbd
E: BACKSPACE=guess
E: DEVLINKS=/dev/input/by-id/usb-046a_0014-event-kbd /dev/input/by-path/platform-3f980000.usb-usb-0:1.2:1.0-event-kbd
E: DEVNAME=/dev/input/event0
E: DEVPATH=/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:046A:0014.0002/input/input1/event0
E: ID_BUS=usb
E: ID_INPUT=1
E: ID_INPUT_KEY=1
E: ID_INPUT_KEYBOARD=1
E: ID_MODEL=0014
E: ID_MODEL_ENC=0014
E: ID_MODEL_ID=0014
E: ID_PATH=platform-3f980000.usb-usb-0:1.2:1.0
E: ID_PATH_TAG=platform-3f980000_usb-usb-0_1_2_1_0
E: ID_REVISION=0100
E: ID_SERIAL=046a_0014
E: ID_TYPE=hid
E: ID_USB_DRIVER=usbhid
E: ID_USB_INTERFACES=:030101:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=046a
E: ID_VENDOR_ENC=046a
E: ID_VENDOR_ID=046a
E: MAJOR=13
E: MINOR=64
E: SUBSYSTEM=input
E: USEC_INITIALIZED=69042133468
E: XKBLAYOUT=gb
E: XKBMODEL=pc105

showkey --scancodes

evdev:input:bvpe-

File /etc/udev/hwdb.d/10-hexkeypad.hwdb

evdev:input:b*v046ap0014* # ML4700
 KEYBOARD_KEY_45=a  # bind numlock to A
 KEYBOARD_KEY_62=b  # bind /       to B
 KEYBOARD_KEY_37=c  # bind *       to C
 KEYBOARD_KEY_01=d  # bind ESC     to D
 KEYBOARD_KEY_1d=e  # bind Ctrl    to E
 KEYBOARD_KEY_38=f  # bind Alt     to F

How to get and build the RaspiElf Keypad/Display Software

The elfdisplay is part of the tools package. See RaspiElf#How_to_get_and_build_the_RaspiEl

Sample session

-- Peter Schmid - 2018-05-03

Comments

Edit | Attach | Watch | Print version | History: r12 | r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r4 - 2018-05-13 - PeterSchmid
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback