How marco-antonio-rodrigues/telegrambot-esp32-cam works
Project Type and Purpose
• This is an embedded IoT project (firmware) running on an ESP32-CAM module.
• Purpose: detect motion via a PIR sensor, capture images with the camera, and send those images (or status messages) to a Telegram chat via the Telegram Bot API.
File Structure
• Top‐level:
• platformio.ini – build/deploy config for PlatformIO
• / – project headers and library READMEs
• lib/ESPmDNS/ – mDNS support library and examples
• src/ – main firmware modules (env.cpp/h, main.cpp, managerUsers, router, telegram)
• data/ & images/ – static assets, documentation files
• test/ – test scaffolding (empty)
• The presence of src/*.cpp and platformio.ini indicates embedded firmware code.
• The lib/ESPmDNS folder shows use of mDNS for local network discovery.
README
• Hardware components: ESP32-CAM, PIR sensor, optional microSD, USB-to-serial adapter.
• Logic flow: PIR → ESP32-CAM triggers photo capture → Telegram API sends image → optional user commands.
• Key variables and endpoints are configured in src/env.cpp.
• Libraries needed: camera driver, PIR input (GPIO 12), Wi-Fi, Telegram Bot client, ESPmDNS.