I would like to enhance the constructor in that way, that I can define during construction if the mode BCM or BOARD is used.
Is this possible?
def __init__(self, pin, mode, tx_proto=1, tx_pulselength=None, tx_repeat=10, tx_length=24, rx_tolerance=80):
self.pin = pin
if (mode.upper() == 'BCM'):
GPIO.setmode(GPIO.BCM)
_LOGGER.debug("Using GPIO Pin " + str(pin))
elif (mode.upper() == 'BOARD'):
GPIO.setmode(GPIO.BOARD)
_LOGGER.debug("Using Board Pin " + str(pin))
....
@milaq Hi,
I would like to enhance the constructor in that way, that I can define during construction if the mode
BCMorBOARDis used.Is this possible?
Kind of like this
see PR: #71
Regards Frank