News

DISTANCE MEASURED WITH ARDUINO AND ULTRASONIC SENSOR



         The ultrasonic sensor is utilized to gauge the distance of objects like scale, measuring tape, etc... The LEDs are utilized to demonstrate the distance in cm. The object is at the most extreme distance 25cm the main LED will shine. At the point when the object comes close, the ultrasonic sensor distinguish the distance and LEDs will sparkle individually.

COMPONENT REQUIREMENT:

        1. ARDUINO
        2. ULTRASONIC SENSOR
        3. BREADBOARD
        4. LED's
        5. 1K RESISTOR
        6. JUMPER WIRE 

CONNECTION:

STEP - 1

      Connect the LED's positive one side and negative another side (LED big leg positive, small leg negative) in the Breadboard.  


STEP - 2

      Connect resistor to LED's positive side in the breadboard.


  
STEP - 3

        Insert ultrasonic sensor in the breadboard and associate jumper wire with the resistor leg and furthermore ultrasonic sensor in the breadboard.

 

STEP - 4

     Connect the wire to the Arduino board.

       *  VCC to 5V

       * TRIG to PIN-11

       * ECO TO PIN-12

       * GND TO GND

       * ALL LED NEGATIVE TO GND

       * CONNECT RESISTOR FROM PIN-2 TO PIN-8   

 STEP - 5

       After the jumper wire connection, upload the code to the Arduino board and then test the experiment. 


 SOURCE CODE: 









No comments