Introduction: Ultrasonic Distance Finder

This project uses an ultrasonic sensor to detect distance ranges which is then indicated by the leds. So as the distance increases, the leds come ON progressively indicating the distances ranges. This project is applicable in cases like measuring hole depths, distance for ceiling to floor etc

Supplies

  1. Arduino uno or any
  2. Ultrasonic Sensor
  3. Leds
  4. Battery and connector
  5. Jumper wires
  6. 200 - 330 ohms resistors

Step 1: Code

Here in the code we delclare the various pins for the ultrasoning Trig and Echo pins and set them as OUTPUT and INPUT respectively. then we also set the led pins as output

We then get the distance in the void loop and use it to turn on the leds progressively with each representing a given value of the distance

Step 2: Schematic