Led on Led send

and a pinMode() command for the sensor, which was missing, added in.

What use is a function that affects digital pins only, to an input-only analog pin? The pinMode() statement was correctly omitted from OP's code.