No matter which Input connection I wire to +5V, only
rioboard.ReadDigitalInput(1)
will return 1. All other values for 'ch' will result in a 0.
When I call
rioboard.ReadAllDigitalInputs()
I get a meaningful mask, which I have used to fix it myself, like so:
def read_digital_input(index):
to_find = 2 ** (index - 1)
mask = rioboard.ReadAllDigitalInputs()
return (mask & to_find) > 0
But why doesn't ReadDigitalInput(ch) work as expected?