TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: DENNIS LEE BIEBER
date: 2019-11-17 17:41:00
subject: Re: Accessing GPIO pins u

On Sun, 17 Nov 2019 20:58:08 +0100, "R.Wieser" 
declaimed the following:

>I do NOT want to do that with some "it works on my Pi, I don't care about
>the other boards or tomorrow" whipped up table.  Hence my wish to have acces
>to those "internal tables" - or better yet, the conversion routine itself
>
 There are NO internal tables... And no global conversion routine.
Tables and conversion are specific to the GPIO library one is using.

 And... if you intend your code to be used by others (via import and
calling functions) you are going to have to document which library you are
using, and for those where it matters, which pin naming structure you
expect them to be using.

 Again -- gpiozero SIMPLIFIES a lot of this... It accepts multiple
naming styles without locking the user into a single style. It accepts
multiple back-ends (RPi.GPIO, pigpio...). Set up your module on the basis
that the end-user should initialize gpiozero with their preferred back-end,
and everything else should be transparent. Any pins that are to be
controlled both within your module and by the end-user SHOULD be something
they provide to your module as an initialization. Any pins your module
dedicates should be documented so the end-user doesn't attempt to use them.


--
 Wulfraed                 Dennis Lee Bieber         AF6VN
 wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.