TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: R.WIESER
from: A. DUMAS
date: 2019-11-17 08:04:00
subject: Re: Accessing GPIO pins u

R.Wieser  wrote:
> Dennis:
>> https://github.com/gpiozero/gpiozero/blob/master/gpiozero/pins/data.py
>> starting at line 1182, though that also requires the information extracted
>> from the table at line 448
>
> Thanks.
>
> But the problem (to me) was not how to get a list ("gpio readall" returns
> the in-use one), but make sure that whatever I would be using would match
> whatever was in use (by RPi.GPIO) on the Pi the code would be used on.
>
> To me the best way to do that is to ask the software I'm already using for
> its list  - even when there would be a translation mistake somewhere calling
> that method instead of doing it with a seperate list would mean the
> pin-translation output would stay in sync.

Do. Not. Use. RPi.GPIO. Instead. Use. Gpiozero.
https://gpiozero.readthedocs.io/en/stable/api_pins.html#changing-pin-factory

--- 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™.