need help programming value of proximity sensor to sweep servo arm

Couldn't I just use an LED for now?

For what?