GPS speedometer and clock
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Shop by category
Shop all componentsA PIR sensor detects the heat movement of a person or pet. The ESP32 sends a Telegram message to your chat when it triggers, then waits one minute before it can send another, so a person walking around does not fill your phone with alerts. The sketch uses your own chat ID, which keeps the message private. Keep the bot token secret.
Tick anything you already have and the total updates.
Follow the colours: red is power, dark grey is ground, blue is a signal.
USB phone charger.
pir_telegram.inoVerify & upload in Electrolark#include <WiFi.h>
#include <WiFiClientSecure.h>
#include <UniversalTelegramBot.h>
const char* SSID = "YOUR_WIFI";
const char* PASS = "YOUR_PASSWORD";
const char* BOT_TOKEN = "YOUR_BOT_TOKEN";
const char* CHAT_ID = "YOUR_CHAT_ID";
const int PIR_PIN = 27;
const unsigned long COOLDOWN_MS = 60000;
WiFiClientSecure client;
UniversalTelegramBot bot(BOT_TOKEN, client);
unsigned long lastAlert = 0;
void setup() {
pinMode(PIR_PIN, INPUT);
client.setInsecure();
WiFi.begin(SSID, PASS);
while (WiFi.status() != WL_CONNECTED) delay(300);
bot.sendMessage(CHAT_ID, "PIR alert is online", "");
}
void loop() {
if (WiFi.status() != WL_CONNECTED) { WiFi.reconnect(); delay(2000); return; }
if (digitalRead(PIR_PIN) == HIGH && (lastAlert == 0 || millis() - lastAlert > COOLDOWN_MS)) {
lastAlert = millis();
bot.sendMessage(CHAT_ID, "Motion detected", "");
}
delay(100);
}
Press Start in your bot's chat first, and check the token and chat ID.
Move the PIR away from heaters and windows, or lower its sensitivity.
Wi-Fi may have dropped. The loop reconnects, but check the router's range.
Yes, anywhere the phone has data; the ESP32 only needs home Wi-Fi.
Not with this board. The ESP32-CAM projects can.
Otherwise one person triggers dozens of messages.
4 parts: ESP32-WROOM-32 38-Pin Development Board, HC-SR501 PIR Motion Detector Sensor Module, Solderless Breadboard and Dupont Jumper Wires (40 pcs). On this page you can tick the parts you already have and add only the rest to your cart.
It is a intermediate project and takes about 1.5 hours. The build on this page has 6 steps.
No. This page has the complete, tested code (pir_telegram.ino).
About ₹518 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Sending Telegram messages from the ESP32; Using a cooldown with millis(); Reconnecting when Wi-Fi drops.
Ideas that reuse this build: Pico W PIR Telegram alert. They are listed under Take it further on this page.
A bike or car speedometer that needs no wheel sensor: satellites do the measuring.
Records where you went every five seconds, ready to open on a map.
Two boards, two radios: press the button at the gate and it rings indoors.
Check temperature, humidity and pressure from any phone on your Wi-Fi.
Learning project. Check every circuit and the datasheet of each part before you power it up.