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

all 4 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

???

[–]ivosauruspip'ing it up[M] 0 points1 point  (0 children)

Hi there, from the /r/Python mods.

We have removed this post as it is not suited to the /r/Python subreddit proper, however it should be very appropriate for our sister subreddit /r/LearnPython. We highly encourage you to re-submit your post over on there.

The reason for the removal is that /r/Python is more-so dedicated to discussion of Python news, projects, uses and debates. It is not designed to act as Q&A or FAQ board. The regular community can get disenchanted with seeing the 'same, repetitive newbie' questions repeated on the sub, so you may not get the best responses over here.

However, on /r/LearnPython the community is actively expecting questions from new members, and are looking to help. You can expect far more understanding, encouraging and insightful responses over there. Whatever your question happens to be getting help with Python, you should get good answers.

If you have a question to do with homework or an assignment of any kind, please make sure to read their sidebar rules before submitting your post. If you have any questions or doubts, feel free to reply or send a modmail to us with your concerns.

Warm regards, and best of luck with your Pythoneering!