Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92917

Re: Keypress Input

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone02.am1.xlned.com!bcyclone02.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <torriem+gmail@torriefamily.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.108
X-Spam-Level *
X-Spam-Evidence '*H*': 0.78; '*S*': 0.00; 'plug': 0.09; 'themselves,': 0.09; 'emulation': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'guys,': 0.16; 'pulls': 0.16; 'switch.': 0.16; 'url:cam': 0.16; 'wrote:': 0.16; 'examples': 0.18; 'handling': 0.20; 'port.': 0.22; 'am,': 0.23; 'header:In- Reply-To:1': 0.24; 'header': 0.24; 'header:User-Agent:1': 0.26; 'linux': 0.26; 'switch': 0.27; 'clean.': 0.29; 'issues.': 0.29; 'environment': 0.29; 'program,': 0.29; 'sense': 0.29; 'maybe': 0.31; 'code': 0.31; 'especially': 0.32; 'board': 0.32; 'probably': 0.32; 'common': 0.33; 'traditional': 0.33; 'message- id:@gmail.com': 0.35; 'could': 0.35; 'to:addr:python-list': 0.35; 'besides': 0.35; 'protocol': 0.35; 'but': 0.36; 'thanks': 0.36; 'should': 0.37; 'subject:: ': 0.37; 'environment.': 0.37; 'virtual': 0.38; 'version': 0.38; 'received:org': 0.38; 'button': 0.38; 'doing': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'where': 0.40; 'some': 0.40; 'your': 0.60; 'close': 0.61; 'john': 0.61; 'per': 0.61; 'side': 0.62; 'more': 0.62; 'matter': 0.63; 'charset:windows-1252': 0.65; 'forums': 0.66; 'serial': 0.70; 'circuit': 0.84; 'route': 0.84; 'url:cl': 0.84; 'wires': 0.84; 'wiring': 0.84
X-Virus-Scanned amavisd-new at torriefamily.org
Date Sat, 20 Jun 2015 10:30:37 -0600
From Michael Torrie <torriem@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Keypress Input
References <rBHbx.75089$MO7.40532@fx10.iad> <Ojtfx.178941$Jv.137884@fx26.iad> <mailman.519.1434474965.13271.python-list@python.org> <Cgfhx.15512$C_.11002@fx15.iad>
In-Reply-To <Cgfhx.15512$C_.11002@fx15.iad>
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.660.1434817849.13271.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1434817849 news.xs4all.nl 2871 [2001:888:2000:d::a6]:34581
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 4367
X-Received-Body-CRC 57014705
Xref csiph.com comp.lang.python:92917

Show key headers only | View raw


On 06/20/2015 09:02 AM, John McKenzie wrote:
> 
>  Guys, thanks for the various code examples for GPIO and the warning 
> about debouncing issues. I am still considering going the route of more 
> complex wiring and doing it a more traditional GPIO way.

You can wire up the button without a little breadboard or circuit board
using this general diagram:

https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/buttons_and_switches/

Just solder the resistors to the wires themselves, and keep them close
to the pi to keep them clean.  Then you you just have to route one wire
per switch, with one common wire hitting the other side of each switch.
 Probably you will want to use the pull-up version where the switch
pulls the signal down to ground.  You may want to use a header to plug
into the rpi.  But besides that should just be a matter of routing wires.

But on the original track, you might want to ask on the kade forums if
there's any way to interact with kade and get events besides HID
emulation.  For example, maybe you could communicate with it over a
virtual serial port.  Or some other protocol so you don't have to worry
about ttys and Linux kernel HID handling for your program, especially in
a headless environment.  Using HID emulation makes sense in a MAME
arcade environment but not for a headless raspberry pi application.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-03 18:22 +0000
  Re: Keypress Input Laura Creighton <lac@openend.se> - 2015-06-03 20:59 +0200
  Re: Keypress Input Gary Herron <gherron@digipen.edu> - 2015-06-03 12:15 -0700
  Re: Keypress Input Gary Herron <gherron@digipen.edu> - 2015-06-03 11:47 -0700
  Re: Keypress Input Laura Creighton <lac@openend.se> - 2015-06-04 12:50 +0200
  Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-06 18:28 +0000
    Re: Keypress Input Laura Creighton <lac@openend.se> - 2015-06-06 22:52 +0200
    Re: Keypress Input Chris Angelico <rosuav@gmail.com> - 2015-06-07 07:20 +1000
    Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-06-06 22:31 -0600
  Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-15 05:15 +0000
    Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-16 15:09 +0000
    Re: Keypress Input Christian Gollwitzer <auriocus@gmx.de> - 2015-06-19 07:20 +0200
      Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-20 14:59 +0000
      Re: Keypress Input Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-15 18:03 -0700
        Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-07-15 22:30 -0600
          Re: Keypress Input Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-16 10:22 -0700
            Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-07-16 15:27 -0600
        Re: Keypress Input Terry Reedy <tjreedy@udel.edu> - 2015-07-16 02:08 -0400
          Re: Keypress Input Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-16 11:30 -0700
        Re: Keypress Input Terry Reedy <tjreedy@udel.edu> - 2015-07-16 03:10 -0400
        Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-07-16 15:29 -0600
  Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-15 05:23 +0000
    Re: Keypress Input Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2015-06-15 12:22 +0100
      Re: Keypress Input Grant Edwards <invalid@invalid.invalid> - 2015-06-15 15:22 +0000
    Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-06-16 11:15 -0600
      Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-16 20:06 +0000
        Re: Keypress Input Grant Edwards <invalid@invalid.invalid> - 2015-06-16 20:49 +0000
          Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-06-16 19:22 -0600
          Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-06-18 16:42 -0600
      Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-20 15:02 +0000
        Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-06-20 10:30 -0600
  Re: Keypress Input Paul Rubin <no.email@nospam.invalid> - 2015-06-16 14:22 -0700
  Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-07-15 19:05 +0000
    Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-07-15 13:17 -0600
      Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-08-16 19:45 +0000

csiph-web