Code Monkey home page Code Monkey logo

iot-camera-gun's Introduction

About

Example of usage EloquentEsp32cam library.

Problem

For example, you want to monitor activity behind a glass window and, if motion is detected, take a screenshot and send it over the network to a telegram bot.

The first solution that comes to mind is to use a PIR sensor. But this solution will not work, because... glass reflects ultraviolet and most infrared light.

PIR

In the working solution, the PID sensor is excluded from the circuit. The camera takes pictures at a certain frequency and compares them with each other, if the comparison algorithm considers that the discrepancies between the frames are significant, the motion trigger is triggered.

Components

ESP32 Ai Thinker Cam

camera

Settings

secrets.h.example:

// wifi
#define WIFI_SSID "wifi network"
#define WIFI_PASS "wifi network pass"

// telegram
#define TELEGRAM_TOKEN "telegram token from @BotFather"

/*
Request:
https://api.telegram.org/bot<TELEGRAM_TOKEN>/getUpdates (Before execute http request you should send at least one message to bot)

Response:
...
"chat": {
    "id": <CHAT_ID>,
    "first_name": "...",
    "username": "...",
    "type": "private"
}
...
*/ 
#define TELEGRAM_CHAT "CHAT_ID"

Links

ESP32 cam motion detection without PIR

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.