Here’s a link to the Pololu page.
QTRXL-MD-01RC Reflectance Sensor
As you noted, it’s a digital sensor, so it will connect to a DIO, and be declared as a digital sensor. Here’s the key bullet:
- Output format: digital I/O-compatible signal that can be read as a timed high pulse
Also, I note from the table that this particular model is recommended for ranges up to 30mm, just a bit over an inch. If you’re planning to look at the carpet, you’ll want to find some way to make sure this doesn’t hit the hab ramp as you drive up and down (perhaps drive up and down backwards from your normal operation).
It looks like in wpilib, you’ll want to use a counter in semi-period mode. I’ve never done that one, but it looks pretty straightforward.