You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Mock implementation of setup only allows one channel as it's first parameter.
According to the RPi.GPIO documentation, (and my own testing) the RPi.GPIO setup function supports the initialization of multiple channels with only one call:
chan_list= [11,12] # add as many channels as you want!# you can tuples instead i.e.:# chan_list = (11,12)GPIO.setup(chan_list, GPIO.OUT)
taken from the 'Setup more than one channel' section in the linked docs
This should also work when providing an initial value:
GPIO.setup([11, 12], GPIO.OUT, initial=GPIO.LOW)
Since one of the goals of this project is to make the switching between the two modules seamless, I would recommend fixing this small difference :)
The text was updated successfully, but these errors were encountered:
Currently the Mock implementation of
setup
only allows one channel as it's first parameter.According to the RPi.GPIO documentation, (and my own testing) the RPi.GPIO
setup
function supports the initialization of multiple channels with only one call:taken from the 'Setup more than one channel' section in the linked docs
This should also work when providing an initial value:
Since one of the goals of this project is to make the switching between the two modules seamless, I would recommend fixing this small difference :)
The text was updated successfully, but these errors were encountered: