Page 1 of 1
Using a USB Keypad with Pi
Posted: Fri Jan 15, 2016 7:31 pm
by Scrappy
So I am taking a class at college and my prof basically threw us a final project saying we have to learn how to use the Pi, make a noteworthy project, and have it all completed in a scary short amount of time.
I have never used the pi before, and actually, mine hasn't been delivered yet but I want to start asking questions now.
My project involves a USB keypad. I know there are non-usb ones I can wire to the breadboard, but I was wondering if it is possible for the pi to use a numeric USB keypad, like this one.
http://www.ebay.com/itm/USB-19-keys-Num ... xygPtSxfyd
Thanks!
Re: Using a USB Keypad with Pi
Posted: Fri Jan 15, 2016 10:12 pm
by Navyscourge
I cannot say for that keypad, but these things usually plug in like a keyboard; they work like a keyboard with a limited set of keys
Re: Using a USB Keypad with Pi
Posted: Fri Jan 15, 2016 10:24 pm
by DougieLawson
It's a USB HID device, it should "just work".
Re: Using a USB Keypad with Pi
Posted: Fri Jan 15, 2016 10:31 pm
by Scrappy
Okay thanks for your replies guys. As for getting it to work, do I need to set up some drivers or code anything for input to work, or since it's a HID USB it literally will just work out of the box? If not, could you link some set up information? I do want to learn how to do this myself since its for a class, so please don't think I'm just asking for free code (: thanks!
Re: Using a USB Keypad with Pi
Posted: Sat Jan 16, 2016 12:03 am
by DougieLawson
Plug in, start pressing buttons and numbers should appear. Nothing special needed.
Re: Using a USB Keypad with Pi
Posted: Sat Jan 30, 2016 11:30 am
by sspross
I bought a hama 00053224 keypad[1] and I want to use it with my raspberry pi to easily enter digits. Is there a way to install or configure a driver for it on raspbian jessie?
If I just plug it in over USB and start typing, nothing happens on the command line.
[1]
https://www.hama.com/00053224/hama-keypad
Re: Using a USB Keypad with Pi
Posted: Sat Jan 30, 2016 12:41 pm
by rpdom
Plug it in. In a terminal, type lsusb (That's lower-case LSUSB) and post the output here. That will show what the device says it is and may help identify a driver.
Re: Using a USB Keypad with Pi
Posted: Sat Jan 30, 2016 1:02 pm
by sspross
lsusb output (I have a Canon printer connected too):
Code: Select all
Bus 001 Device 004: ID 04a9:1772 Canon, Inc.
Bus 001 Device 008: ID 05a4:8003 Ortek Technology, Inc.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Its Bus 001 Device 008: ID 05a4:8003 Ortek Technology, Inc.
I also tried capturing input with python-evdev. I can see the keypad:
Code: Select all
>>> from evdev import InputDevice, list_devices
>>> devices = [InputDevice(fn) for fn in list_devices()]
>>> for dev in devices:
... print(dev.fn, dev.name, dev.phys)
...
('/dev/input/event1', 'Keypad USB Keypad ', 'usb-3f980000.usb-1.5/input1')
('/dev/input/event0', 'Keypad USB Keypad ', 'usb-3f980000.usb-1.5/input0')
But nothing happens if I try to capture the input.
Re: Using a USB Keypad with Pi
Posted: Sun Jan 31, 2016 9:47 am
by sspross
I think it has to do with the numlock settings, because I can see the same stuff as in
http://unix.stackexchange.com/questions ... ian-wheezy
Does anyone know how I can change this? I tried editing /etc/kbd/config, uncommenting LEDS=+num. But it doesn't help.
EDIT: I've opened a question on stackexchange:
http://raspberrypi.stackexchange.com/qu ... ian-jessie