NEED HELP REGARDING THE UNSTABLE DATA OBTAINED FROM SHARP IR SENSOR GP2Y0A02Y

Hi,
I am trying to interface a sharp IR sensor GP2Y0A02Y with Arduino UNO board. How to know how much current is the sensor drawing? I am also getting very random data like though the sensor is kept in a fixed position there is a change in the readings. My code is given below. I tried putting a capacitor in series with the battery and sensor but still, there is no change. I have included the circuit diagram also. How to get out of this problem?
Thanks in advance.

codeupload2.JPG

First: don't shout at us! All-caps are not the way to write thread titles.

Post code as code (there is the </> button in the editor to set code tags), we don't read code sent as pictures.

How to know how much current is the sensor drawing?

How about measuring it? The datasheet tells that it's about 30 to 50mA but if you use a breakout board that may very depending on the additional circuitry.

I am also getting very random data like though the sensor is kept in a fixed position there is a change in the readings.

Define "very random"! An example output may help and don't forget to describe your setup in detail. In which distance did you place the reflective material that the sensor needs?

I have included the circuit diagram also.

Interesting, I cannot find it.