Cov txheej txheem:

Siv Motion Sensor Nrog RaspberryPi thiab Telegram Bot: 4 Cov Kauj Ruam
Siv Motion Sensor Nrog RaspberryPi thiab Telegram Bot: 4 Cov Kauj Ruam

Video: Siv Motion Sensor Nrog RaspberryPi thiab Telegram Bot: 4 Cov Kauj Ruam

Video: Siv Motion Sensor Nrog RaspberryPi thiab Telegram Bot: 4 Cov Kauj Ruam
Video: Xib Fwb Tujuj (Hmong Dubbed) 2024, Kaum ib hlis
Anonim
Siv Motion Sensor Nrog RaspberryPi thiab Telegram Bot
Siv Motion Sensor Nrog RaspberryPi thiab Telegram Bot

Nyob zoo cov neeg.

Hauv cov ntawv no peb yuav siv Raspberry Pi Telegram Bot nrog PIR (tsab ntawv tsa suab) sensor.

Kauj ruam 1: Txuas PIR

Txuas PIR
Txuas PIR

Kuv muaj PIR sensor ua ntej thiab kuv xav siv kuv lub PIR sensor nrog Raspberry Pi. Kuv ua raws phau ntawv qhia ntawm no yog qhov txuas:

Kauj Ruam 2: Yuav Ua Li Cas Tsim Telegram Bot

Yuav Ua Li Cas Tsim Telegram Bot
Yuav Ua Li Cas Tsim Telegram Bot

Nyem qhov txuas no "Yuav tsim Telegram Bot li cas"

Tsim tus bot tshiab Siv cov /newbot hais kom tsim tus bot tshiab. BotFather yuav nug koj lub npe thiab lub npe siv, tom qab ntawd tsim daim ntawv tso cai tso cai rau koj tus bot tshiab. Lub npe ntawm koj tus bot tau nthuav tawm hauv cov ntaub ntawv tiv toj thiab lwm qhov. Lub npe siv yog lub npe luv, yuav siv rau hauv kev hais txog thiab telegram.me txuas. Cov neeg siv lub npe yog 5-32 tus cim ntev thiab tsis muaj teeb meem, tab sis tsuas yog suav nrog cov ntawv Latin, cov lej, thiab cov cim hauv qab. Koj tus bot lub npe siv yuav tsum xaus rau hauv 'bot', piv txwv li 'Tetris_bot' lossis 'TetrisBot'.

Cov cim cim yog cov hlua raws kab 110201543: AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw uas yuav tsum tau tso cai bot thiab xa kev thov mus rau Bot API.

Kev tsim daim ntawv tso cai Yog tias koj lub token uas twb muaj lawm raug cuam tshuam lossis koj poob nws vim qee qhov, siv /token hais kom tsim ib qho tshiab.

core.telegram.org/bots#6-botfather

Kauj Ruam 3: Bot thiab Raspberry Pi

Bot thiab Raspberry Pi
Bot thiab Raspberry Pi
Bot thiab Raspberry Pi
Bot thiab Raspberry Pi
Bot thiab Raspberry Pi
Bot thiab Raspberry Pi

Raspberry Pi txuas ssh

git clone

cd RaspberryPiTelegramPIR/

nano PIRBot.py

CTRL+X thiab txuag tawm nano

sudo nab hab sej PIRBot.py

Github Txuas:

Thawj ncej:

Pom zoo: