!!!EXPLAIN HOW IT WORKS WITHIN THE CODE WITH COMMENTS!!! The idea of the Project is to use the PIR sensor in combination with the HC-SR04 ultrasound sensor, a servo motor, three LEDs (red, yellow, green), an LCD and a buzzer. The final project must simulate an entrance and exit system of an urbanization that can grant access when the PIR detects a person. And meet the following conditions: 1) The mechanical arm must be simulated with a servo motor (when it is down, 0 ﹾ, the red led must be on). This must go up when placing a hand on the PIR sensor (during the raising of the arm the yellow led must be turning on and off). 2) Simultaneously when the mechanical arm is activated, an audible alarm must also be activated (buzzer at the rate of the yellow led) and when the arm is fully up (90 ﹾ) the green light must be turned on (the only LED on at that moment). 3) The ultrasound sensor will detect an object that interferes with the normal return of the arm to its initial position and will keep it or return upwards until the object is removed, and the active audible alarm and the flashing yellow led will be kept simultaneously. 4) After a reasonable time (5 seconds) the mechanical arm should return to its initial position. In the event that the HC-SR04 detects an object close enough (<20cm) during the descent, the arm must be returned to the vertical position and wait for a reasonable time again. 5) When the program starts, the red led should be placed and the system be with the arm down, then change state for the normal process of entering and leaving the urbanization when the PIR is activated. 6) Everything that is happening in the system must be displayed on an LCD. 7) The project must include a minimum of 2 Arduinos that will communicate via UART. One of the micros will read both sensors (PIR and HC-SR04), while the other will be in charge of manipulating all the output components (LEDs, LCD, buzzer, Servo motor).
!!!EXPLAIN HOW IT WORKS WITHIN THE CODE WITH COMMENTS!!!
The idea of the Project is to use the PIR sensor in combination with the HC-SR04 ultrasound sensor, a servo motor, three LEDs (red, yellow, green), an LCD and a buzzer. The final project must simulate an entrance and exit system of an urbanization that can grant access when the PIR detects a person. And meet the following conditions:
1) The
2) Simultaneously when the mechanical arm is activated, an audible alarm must also be activated (buzzer at the rate of the yellow led) and when the arm is fully up (90 ﹾ) the green light must be turned on (the only LED on at that moment).
3) The ultrasound sensor will detect an object that interferes with the normal return of the arm to its initial position and will keep it or return upwards until the object is removed, and the active audible alarm and the flashing yellow led will be kept simultaneously.
4) After a reasonable time (5 seconds) the mechanical arm should return to its initial position. In the event that the HC-SR04 detects an object close enough (<20cm) during the descent, the arm must be returned to the vertical position and wait for a reasonable time again.
5) When the program starts, the red led should be placed and the system be with the arm down, then change state for the normal process of entering and leaving the urbanization when the PIR is activated.
6) Everything that is happening in the system must be displayed on an LCD.
7) The project must include a minimum of 2 Arduinos that will communicate via UART. One of the micros will read both sensors (PIR and HC-SR04), while the other will be in charge of manipulating all the output components (LEDs, LCD, buzzer, Servo motor).
Step by step
Solved in 3 steps with 3 images