
ECHO pin will double that time since this pin measures the time to and from the object.

Transmitter(TRIG pin) sends a signal, when signal finds object, signal is reflected and received by the receiver (ECHO pin).

It has 4 pins: VCC, TRIG, ECHO, and GND.Uses sonar to determine distance to an object.Switches are turned on and off based on logic gates, for example, if input 1 is low and input 2 is high, then motor will spin forward and vice versa.Input 1 and 2 control one motor and input 3 and 4 control the other motor. Input pins 1, 2, 3, and 4 control the switches of the H-Bridge.Enable A and Enable B pins are used to control the speed of the motor.There is a 2V drop caused by the IC (integrated circuit ), so the voltage at the motor terminals is 10 V which means that full speed won’t be achieved by motors.If VCC 12 V, it is recommended not to use 5 V regulator since VCC could damage it. On-board 5 V regulator which can be used as input or output.Able to control DC motors that have voltages from 5 to 35 V.Allows for speed and direction control of two DC motors at the same time.All of the distance and detection parameters can be changed in the Arduino code to make it do even more things. When an object is detected in close proximity, the robot will stop, go in reverse, and look for a clear path with the help of the ranging sensor. In combination with this, I used the L298N H-Bridge to control the wheels of the robot. This sensor allows the robot to sense any object in front of it. NT1 avoids obstacles in its way by using the ultrasonic ranging sensor HC-SR04.
