No bio available
servo motor, and an ultrasonic sensor to create a simple object detection and response system. The ultrasonic sensor features four terminals: VCC, GND, Trigger, and Echo. The VCC and GND pins provide power to the sensor. The Trigger pin is responsible for emitting ultrasonic sound waves. These waves travel through the air until they encounter an object, at which point they are reflected back toward the sensor. The Echo pin receives the reflected signal. The time taken for the ultrasonic wave to travel to the object and return is measured. This duration is then used to calculate the distance using the formula: Distance = Time × Speed of Sound / 2 This distance is processed by the Arduino, which uses it to control the servo motor through a conditional statement: If the detected distance is less than or equal to 25 centimeters, the servo motor is activated and rotates 120 degrees. If the distance is greater than 25 centimeters, the system introduces a 2-second delay, after which the servo motor returns to its original 0-degree position. This setup provides a practical demonstration of using sensor data for real-time mechanical control based on environmental feedback.