The device itself is working properly. After you have written a few lines of code, the input signal converting the sensor works reliably. In the test he has the distance between approximately 3-4 cm and 200 - 300cm can properly determine. It always depends a little from the reflective surface and from the conditions in the room.
When "eye" for my robot is this range but ideal.