LED and Servo Code Working in Opposite Way

Delta_G:
The datasheet should say somewhere if the pin is normally low and goes high when it senses touch or vice versa

Oh, I understand now.

I've checked again and the manual says when the sensor is touched, it goes to a low value (0). It returns to a high value (1000) when it is not touched.