I’m using SparkFun Line Sensor Breakout QRE1113 digital board. I was struggling to understand how to read the output, and I found the solution from the forum that is, to connect 10k resistor between VCC and OUT, and read the voltage between OUT and GND. This seems to work and the output voltage changes from VCC to 0 when a reflective object is brought in front of the sensor. But the output is analog, the value depends on the reflectivity of the object. So, what is the difference between Analog and digital sensor?
I have not used the analog sensor, so knowing the difference will help me in choosing the right board for my application.
The digital sensor performs the same function, translating the analog signal into either a ‘high’ or ‘low’ output that can be interpreted elsewhere as a binary 1 or 0. Some allow you to set the thresholds
The analog sensor just varies its resistance with light, allowing you to create code that may determine when/where you’d like the 0 or 1 to be scaled (for instance, you could make it only output 1 (high) for thetop 10% of it’s range using custom code)
Basically, the digital version already has a resistor in-place…the analog version is useful if you need to use a different resistance
But I could not get a digital output using the digital board. I was expecting the output pin state to toggle, when a reflective object was brought to proximity. Is there a specific way to check the output on digital board?