Sharp GP2Y0D810Z0F how to use?

Thanks, I solved the problem with putting out the resistor :smiley:

I'm now able to check if there is an object with an if condition.

But I've one more question: what's the difference between the digital and the analog pins? I learned that I should put the IR_Sensor into an analog pin, but the picture from the link you wrote showed that I should use a digital pin.

Thanks!