Need help with sharp ir GP2Y0A02YK0F distance sensor

In addition to the decoupling capacitor, In your second link there's a post that says you should also ground the black plastic case of the sensor. It would be something simple to try...