- ESP-WROOM32
- PIR sensor
- Solderless breadboard
- Jumper wires
- Batteries (4 x 1.2V)

- ESP32-CAM
- FTDI programmer
- Jumper wires
- Power bank

Both modules need hidden file credentials.h which stores secrets only known to the administrator of the system. This includes:
- SSID and password for the WiFi connection (necessary for both modules)
- telegram bot token and user ID (only for motion module)
- webserver authentication name, password, and token (only for camera module)
The codebase presented in this repository does not include such files due to privacy preservation. You should include your own credentials.h files for both modules.
ESP-WROOM32 is running the code shown in motion directory. The board is listening for sensor trigger at GPIO25 pin. After the trigger, a telegram notification is sent to the client. Simultaneously, the board sends a signal that the motion sensor was triggered to ESP32-CAM board using ESP-NOW wireless comunication protocol.
The program executed by ESP32-CAM board is present in cam directory. The board runs a webserver with authentication to access and control the camera. The currently supported functionalities are:
- Camera flashlight toggle
- Photo capture
- Get the time of the most recent motion sensor trigger
When the ESP32-CAM board receives a signal from the motion module, it immediately captures the photo to potentially capture the object triggering it.

