ESP32 Starter Kit
(continued from previous page)
}
5. Test Result
After connecting the wiring and uploading the code, open serial monitor to set baud rate to 9600, and the serial port
prints the PIR value.
6. Knowledge Expansion
Let’s make an invasion alarm. When the PIR sensor detects human, LED lights up and the buzzer emits sound. In
contrast, LED goes off and the buzzer stays quiet.
Flow Chart
8.5. Arduino Project 107