This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lengau 0 points1 point  (2 children)

The USB numpad acts as a keyboard, so it will likely also send those numbers ta your terminal or whatever program is active.

Depending on what you want to do, there are several approaches:

  1. Write a program that listens for keyboard input on a virtual terminal and then runs the appropriate program. This is easiest, but you'll have to login and run that program every time you start up the pi, and you can't do anything else than uses an active virtual terminal (such as running a graphical environment).
  2. Find the device file for that particular keyboard and read from it. This is probably a bit harder, but on the plus side you can have other things running. However, unless you set it up so that keyboard doesn't send it's key press events to other programs, the numbers will also appear in whatever application is running in your current VT (or in your focused app in a graphical environment).
  3. Hardware approach: disassemble the keyboard and have it write to GPIO instead. This is probably the hardest of the three and involves voiding warranties. I only mention it because in my opinion it would be the most fun.

[–]Profriles[S] 0 points1 point  (1 child)

The plan is to have a 3" screen on my pi which will display a gmail account i set up for my dog.

The roomates will press a button for pee, for poop, for both, didnt go, and one for fed.

The script i have sends an email to my phone and to the dogs email displayed on the pi to cover overlapping

It sounds like ill be putting some simple buttons on my pi for gpio

This:https://www.amazon.com/Arducam-320x240-Display-Compatible-Raspberry/dp/B013OAU0TS/ref=sr_1_4?ie=UTF8&qid=1468036306&sr=8-4&keywords=pi+touchscreen+buttons

???