Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 1.1 KB

README.md

File metadata and controls

7 lines (5 loc) · 1.1 KB

Obstacle Detection System

The obstacle detection system, created using PIC 16f877a microcontroller and HC-SR04 ultrasonic sensor, operates by emitting high-frequency sound waves and measuring the time it takes for the waves to bounce back after hitting an obstacle.

First, the PIC 16f877a microcontroller initializes the system and sets up the necessary parameters. Then, the HC-SR04 sensor emits an ultrasonic pulse. This pulse travels through the air until it encounters an obstacle. Upon hitting the obstacle, the pulse is reflected back to the sensor. The sensor calculates the time taken for the pulse to return.

Based on the time taken for the pulse to return, the microcontroller determines the distance between the sensor and the obstacle. If the distance is within a predefined threshold, indicating the presence of an obstacle within the detection range, the microcontroller triggers an alert mechanism, such as sounding an alarm or activating a warning light.

This process continues in a loop, constantly monitoring the surroundings for obstacles and alerting the user whenever one is detected