[Need Help] Using distance sensor with arduino uno

Hi everyone. I have a project need to be done and i need help.. Please at least read this.. I have to make a car gas pedal and a car deshboard. I designed the gas pedal and put the behind of it a distance sensor(4-40cm). I will design a deshboard and put LEDs upside of each value on it. (For 10kmh,20kmh...120kmh) I am thinking that, when i push the gas pedal, the sensor will read a value and when the distance is 5cm the LED on 10kmh will be opened, when distance is 6cm then the LEDs on 10kmh and 20kmh will be opened at the same time. It should be go like this. I don't really know if i did explain what i need exactly. I hope you understand me, my English is not very well though. The biggest problem is, i have never take any programming courses so i dont know how to write this programme on Arduino too. I have searced on the internet a lot but i couldnt get what i need. I feel pretty bad, cause i couldnt handle this project and asked for help. But i really need the code. So, if you can help me, i would be really grateful.

Thank you all from now..

If you want someone to write the code for you (probably for a fee) you should ask in the Gigs and Collaborations section.

If you want to learn how to write the program yourself, look through the examples that come with the Arduino IDE. You will almost certainly find examples that are pretty close to the pieces you need.

When you are confident that you understand how the examples work and can write your own short programs you will probably find it easy enough to do your project.


When going through the Examples, this page will help: http://arduino.cc/en/Tutorial/HomePage

Each Example is described and linked to a Tutorial for that Example.