Cov txheej txheem:
- Kauj ruam 1: Tsim Bot hauv Telegram
- Kauj Ruam 2: Txhim Kho Bot hauv Raspberry Pi
- Kauj Ruam 3: Tshooj Cai
- Kauj Ruam 4: Xaus
Video: Yuav Ua Li Cas Ua Yooj Yim IOT Nrog Telegram Daim Ntawv Thov: 5 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Hauv tiam tam sim no Internet yog txhua yam. Internet ntawm Yam Ua lub luag haujlwm tseem ceeb hauv ntiaj teb tam sim no.
Tsis tas yuav nkim sijhawm ntau, peb tuaj yeem txav mus rau qhov ua haujlwm ntawm IOT. Ntawm no peb yuav tswj hwm tus coj thiab tseem muaj lwm yam zoo siab los ntawm xov tooj xa xov.
Kauj ruam 1: Tsim Bot hauv Telegram
1. Hauv cov kauj ruam no teeb tsa Telegram app hauv xov tooj. Kev teeb tsa yog yooj yim li whats app teeb tsa.
2. Hauv Telegram tshawb rau Bot txiv thiab tsim tus bot tshiab los ntawm kev ua raws cov duab hauv qab no.
3. Thaum kawg, theej the HTTP API token. (Tsis txhob qhia rau lwm tus) thiab nkag mus pib hauv bot
Kauj Ruam 2: Txhim Kho Bot hauv Raspberry Pi
Yog li bot tau tsim thiab nws yuav tsum tau khiav ntawm ib qho ntawm cov cuab yeej yog li ntawd rau txhua cov lus peb xa nws yuav teb raws li.
Ntawm no peb tab tom siv raspberry pi nrog tus lej Api thiab ua haujlwm nws hauv cov nab npawb nab npawb. (Nws kuj tseem tuaj yeem ua haujlwm hauv peb li kev ua haujlwm ib txwm muaj)
1. Kev teeb tsa tus lej xov tooj ntawm raspberry pi
Ua ntej peb pib ua haujlwm bot ntawm raspberry pi ua kom ntseeg tau tias koj tab tom khiav qhov tsim nyog ntawm nab hab sej 2. Tsis tas li Yog tias koj muaj kev ua xyem xyav txog qhov pib ntawm Raspberry pi koj tuaj yeem saib thawj 2 kauj ruam hauv qhov kev qhia no ntawm kuv Txhawm rau teeb tsa tus lej xov tooj hauv nab hab sej hauv kab hais kom ua ntawm raspberry pi nkag mus hauv qab no (lub npe module yog telepot))
sudo pip nruab telepot
2. Txhua tus ntawv nab hab sej
Python tsab ntawv tau ua tiav hauv kab hais kom ua siv cov lus txib hauv qab no sudo python telegrambot.py
Kauj Ruam 3: Tshooj Cai
Yog li thaum peb xa cov lus mus rau bot, nws teb zoo ib yam.
Hauv txoj cai peb yuav qhia tus bot kom teb rau peb cov lus txib.
Ntawm no kuv yuav tsis qhia koj li cas cov ntawv nab nab ua haujlwm zoo li nws yuav piav qhia ntau ntxiv.
ntshuam RPi. GPIO raws li GPIO lub sijhawm ntshuam, hnub tim ntshuam telepot los ntawm telepot.loop ntshuam MessageLoop GPIO.setmode (GPIO. BCM) coj = 23 GPIO.setup (coj, GPIO. OUT) tam sim no = datetime.datetime.now ()
def kev ua (msg):
chat_id = msg ['tham'] ['id'] hais kom = msg ['ntawv']
print 'Txais: % s' % hais kom ua
yog hais kom ua == 'nyob zoo':
telegram_bot.sendMessage (chat_id, str ("Hi!.minute)) elif command == 'pic': telegram_bot.sendPhoto (chat_id, photo = "https://raw.githubusercontent.com/engineerlookts/engineerlookts/gh-pages/E.png") elif command == 'ledon ': telegram_bot.sendMessage (chat_id, str (' Led is on ')) GPIO.output (coj, Muaj tseeb) elif hais kom ua ==' ledoff ': telegram_bot.sendMessage (chat_id, str (' Led is off ')) GPIO. cov zis (coj, Tsis tseeb) lwm qhov: telegram_bot.sendMessage (chat_id, str ('Tsis tuaj yeem tau txais koj pls kom meej!'))
telegram_bot = telepot. Bot ('Nkag mus rau koj tus lej API')
luam tawm (telegram_bot.getMe ())
MessageLoop (telegram_bot, nqis tes ua).run_as_thread ()
luam 'Up and Running ….'
thaum 1:
sijhawm.sleep (10)
i. Qhov no kuv tau ua nyob zoo thiab cov lus teb rau nws yog "Nyob Zoo! Txais tos rau Engineerlookts.com". Ib yam li ntawd, rau txhua qhov hais kom ua, koj tuaj yeem hloov kho koj Lub Tswv Yim.
ii. Enter your API ID here in this line "telegram_bot = telepot. Bot ('Nkag mus rau koj tus ID API')"
Kauj Ruam 4: Xaus
Ua tsaug …! koj tau ua tiav koj Thawj DIY IOT project.
Ntxiv mus, Kuv tso nws rau koj tus kheej txhawm rau txhim kho tus qauv los ntawm kev ntxiv koj lub tswv yim. Qee qhov Kev Xav ntawm kuv yog.
i. Home Automation -Connecting Output to the relays.
ii. Can tsim koj tus kheej cov neeg rau zaub mov-uas tuaj yeem teb koj cov lus
iii. Muaj koj tus kheej chatbot-uas tuaj yeem teb cov lus zoo li Natasha hauv kev taug kev.
Yog li IDEAS tsis muaj qhov kawg yog tias koj tuaj yeem tshawb xyuas ntawm koj tus kheej. HOPE Kuv tau pib me me rau IOT rau koj. Kuj tawm tswv yim koj Cov Tswv Yim hauv cov lus.
Ua tsaug
N. Aranganathan
Pom zoo:
D.I.Y YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM LOS NTAWM SCRAPS: 4 Cov Kauj Ruam (nrog Duab)
D.I.Y YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM LOS NTAWM SCRAPS: Hnub no kuv xav qhia yuav ua li cas kom pom lub teeb pom kev zoo los ntawm lub zog xa hluav taws xob tsis siv hluav taws xob los ntawm tus txhuam txhuam hniav thiab lub tshuab solenoid valve coils uas tau khaws los ntawm scrapyard.Ua ntej pib, thov saib cov vis dis aus hauv qab no:
Yuav Ua Li Cas Txuas Android Daim Ntawv Thov Nrog AWS IOT thiab Nkag Siab Lub Suab Pom Zoo API: 3 Cov Kauj Ruam
Yuav Ua Li Cas Txuas Android Daim Ntawv Thov Nrog AWS IOT thiab Nkag Siab Lub Suab Pom Pom API: Qhov kev qhia no qhia tus neeg siv yuav ua li cas txuas Android Daim Ntawv Thov rau AWS IOT server thiab nkag siab lub suab lees paub API uas tswj lub Tshuab Kas Fes. Kev Pabcuam Suab, txhua lub app c
Txoj Kev Yooj Yim thiab Yooj Yim Los Hloov Koj Lub Xauv Screen hauv 6 Cov Kauj Ruam Yooj Yim (Windows 8-10): 7 Kauj Ruam
Txoj Kev Yooj Yim thiab Yooj Yim Los Hloov Koj Lub Xauv Screen hauv 6 Cov Kauj Ruam Yooj Yim (Windows 8-10): Xav hloov pauv yam ntawm koj lub laptop lossis PC? Xav tau kev hloov pauv hauv koj qhov chaw? Ua raws cov kauj ruam no yooj yim thiab yooj yim kom ua tiav koj tus kheej lub computer ntsuas phoo
YUAV UA LI CAS YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM TSHAJ PLAWS YOOJ YIM: 4 Cov Kauj Ruam
YUAV UA LI CAS YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM YOOJ YIM TSHAJ PLAWS: Nyob zoo txhua tus hauv cov lus qhia no kuv yuav qhia koj yuav ua li cas kom yooj yim " SOIL DRYNESS SENSOR ". Qhuav ntawm cov av tau txheeb xyuas siv qhov taw qhia coj. Lub teeb ci wi
Yuav Ua Li Cas Thiaj Li Yooj Yim Yooj Yim 'Calendar & Scrapbook (txawm hais tias Koj Tsis Paub Yuav Ua Li Cas Scrapbook): 8 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Thiaj Li Yooj Yim Yooj Yim 'Calendar & Scrapbook (txawm hais tias Koj Tsis Paub Yuav Ua Li Cas Scrapbook): Nov yog qhov kev lag luam pheej yig (thiab muaj txiaj ntsig ntau!) Hnub so khoom plig rau niam tais yawm txiv. Kuv tau ua 5 daim qhia hnub hli xyoo no rau tsawg dua $ 7 txhua qhov khoom siv: 12 daim duab zoo ntawm koj tus menyuam, menyuam yaus, ntxhais xeeb ntxwv, tub xeeb ntxwv, dev, miv, lossis lwm tus txheeb ze 12 daim sib txawv