The reported code used an invalid sample rate. This improves
the error message so that it is not a generic IDFError.
The new error message says:
```
ValueError: sample_rate must be 20000-2000000
```
I verified at a sample rate of 20000 that I could read both 0
and 65535 using a jumper wire to another GPIO pin configured as a
digital output.
Closes#9504