Reading IR sensor, returns inconsistent readings

Maybe it needs to be collected as divider.... Something like the pic attached, which I know isn't exactly what you have.

Capture.JPG