Despite the photo below now I have a tube of black heatshrink shielding the sensor. It increase the analog output, for both cases (black and white). Regardless, the behaviour remains the same as without the shield when I move unto digital pins. I've been trying to deal with debouncing for the past couple of days with no luck.