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

On Sun, 17 Nov 2019 07:40:37 +0100, "R.Wieser" 
declaimed the following:

>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.
>
 For RPi.GPIO one uses

  mode = GPIO.getmode()

which will return Board, BCM, or None (if the mode has not yet been set).




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