The motion sensor sends an API request to the local hosted server if someone is detected and opens the defined file/app.
- ESP32 (5$)
- hc-sr501 (1$)
The board is powered with my personal 10,000Mah spare power bank but it can be powered with a cheap lipo battery or directly through your laptop/pc.
- Clone this repo and open the src file
- Configure the platform.ini according to your board
- Inside server.py, replace
pdf_path
with your file path - Go to main.cpp, replace your
WIFI_SSID
,WIFI_PASSWORD
,API_URL
with your credentials - Place the device where you want the sensor to detect presence
- The API server runs in the background, close it from system tray to end the process.