Dec-28-2017, 10:26 PM
This is unrelated to your code, but all those functions look veeeeery similar to me, so I'd probably just turn them all into a single function. Maybe something like:
As to your actual question, what does this mean?
def set_pins(first=True, second=True, third=True): GPIO.output(17, GPIO.HIGH if first else GPIO.LOW) GPIO.output(27, GPIO.HIGH if second else GPIO.LOW) GPIO.output(22, GPIO.HIGH if third else GPIO.LOW)Then, maybe I'd have some helper functions for each combination:
MUX1shift1_Y0 = lambda: set_pins(False, False, False) # etcThe helpers could probably all be generated in a loop, instead of copy-paste (but I'm a little too busy to think that hard right now, lol).
As to your actual question, what does this mean?
Quote: I need the GPIO's to be returned from the functionGiven one of the combinations, what, exactly, should be the return value?