Building a car

GreenYeti:
Ok apparently my led was the culprit, now once I swapped the led, the led emits a light of regular intensity. However, the led just stays alight for the entire time, instead of changing depending on the distance between it and the object.

Did you read and understand posts #3 and #4? Have you changed your code to reflect the advice?

As for the servo, the latest code you've shown us doesn't even try to do anything with a servo so I think we need to see your current code.

Steve