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