Hello all,
I'm trying to put some GPIO pin related code into a class object, when I
realized that when I, while initializing the object, use
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
I could be overriding a previously set mode, or my setting could be
overruled by a later on in the code. Which would mean that either my object
or some other code would be referencing the wrong GPIO pins. :-(
I already tried
import RPi.GPIO as GPIO1
GPIO1.setmode(GPIO1.BCM)
import RPi.GPIO as GPIO2
GPIO2.setmode(GPIO2.BOARD)
, but that threw an error on the second ".setmode()"
So my question is:
Can I use two different pinnumbering schemes at the same time ? And if so,
how ?
Maybe by instanciating RPi.GPIO as an object (making all settings local to
it) ?
Regards,
Rudy Wieser
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|