Materials: ESP 8266 (Micro Computer) HC-SR04(Ultrasonic Sensor) Logi Webcam
Stack: Platformio Flask
Description: Using our Ultrasonic sensor we are constantly check for distance every 10th microsecond. If the distance reaches below 50 and if statement will trigger the flask server. Flask server has openCV and uses and https request to automatically open the camera. When the camera opens up it will start scanning every frame for a face. If it doesnt detected you face the camera will close, but if it does (it needs to see a face for 8 frames in a row, thats the confidence) out flask server will call the notify function in our email_sender script, which will send an email stating there was motion detected.
Setup:
- In email_sender.py and main.cpp you need to change the strings (They are labeled as "your-----here")
- Run server.py (refer to this repo https://gist.github.com/mrizwan47/c9ebbfd68564785ee972dc2a13db5210)
- Build main.cpp
- Upload main.cpp to you esp8266
- Connect your HC-SR04 to you esp8266 (https://github.com/SilkyDaveCodes/Ultrasonic-Sensor)
- Make sure your webcam is plugged in
- Open the serial monitor (Make sure you have teh corret baud)