I'm trying to get a servo to move when something is near it

STEP-1: Post your objective (summary of project objective)
STEP-2: Post your code