ESP32 PIR Passive Infrared Motion Sensor Project
The ESP32 PIR Passive Infrared Motion Sensor project demonstrates how to detect motion using a PIR sensor connected to an ESP32 microcontroller. This project is ideal for security systems, automated lighting, and occupancy detection.
Components Needed
- Power Supply
Block Diagram
Circuit Setup
Connecting the PIR Sensor to ESP32:
Instructions
Setup:
Initialize serial communication for debugging purposes using
Define the GPIO pin connected to the PIR sensor(
Set the PIR sensor pin as an input using
Operation:
- Use
- Print the read value to the Serial Monitor using
- Check if the sensor value is HIGH, indicating motion detection.
- Print a message to the Serial Monitor indicating whether motion is detected or not.