Cov txheej txheem:
- Khoom siv
- Kauj ruam 1: Txiav:
- Kauj Ruam 2: Txuas PIR Sensor:
- Kauj Ruam 3: Teeb Webhooks:
- Kauj ruam 4: Code:
Video: Raspberry Pi Motion Sensor IFTTT: 4 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Nyob zoo. Kuv yog tus kawm qib 4 thiab niaj hnub no peb yuav ua IFTTT lub suab ntsuas
Khoom siv
1x lub thawv ntawv me me
1x raspberry pi qauv b+ lossis a+
1x PIR sensor https://www.amazon.com/gp/product/B07KZW86YR/ref=p… (Ntau yam) jumper xov hlau
1x lub teeb pom kev zoo (xaiv tau)
Cov kab xev (xaiv tau)
ifttt tus account
Kauj ruam 1: Txiav:
Txiav ib lub qhov me me nyob nruab nrab ntawm lub npov saum toj.
Kauj Ruam 2: Txuas PIR Sensor:
Txuas lub PIR sensor tus pin cim VCC mus rau 5V tus pin ntawm Raspberry Pi. Qhov no muab lub zog rau PIR sensor. C txuas ib daim ntawv sau npe GND rau tus pin hauv av ntawm Pi (tseem sau tias GND). Qhov no ua tiav qhov Circuit Court. Hauv qhov piv txwv no, peb tau xaiv GPIO 4. Tus pin OUT yuav tso tawm qhov hluav taws xob thaum lub ntsuas pom pom qhov txav mus los. Qhov voltage yuav tau txais los ntawm Raspberry Pi.
Kauj Ruam 3: Teeb Webhooks:
ua ib qho tshiab applet, thiab tom qab ntawd Xaiv Webhooks. thiab tom qab ntawd ua tib yam nrog cov ntawv ceeb toom.
Kauj ruam 4: Code:
Rau nab nab 3 lossis thonny
#! /usr/bin/nab nab # Importsimport RPi. GPIO raws li GPIOimport lub sijhawm thov thov # Teeb tsa GPIO lub npe kev sib tham GPIO.setmode (GPIO. BCM) # Tua GPIO cov lus ceeb toom GPIO.setwarnings (Tsis tseeb) # Teeb tus lej sib txawv los tuav GPIO Pin identitypinpir = 17 # Teeb GPIO tus pin raws li kev nkag GPGP.setup (pinpir, GPIO. IN) # Cov lej sib txawv los tuav lub xeev tam sim no thiab zaum kawg = tam sim no 0 ua ntej dhau los = 0 sim: luam tawm ("Tos rau PIR daws …") # Loop kom txog thaum PIR tso tawm yog 0 thaum GPIO.input (pinpir) == 1: currentstate = 0 print ("Ready") # Loop kom txog thaum cov neeg siv tawm nrog CTRL-C thaum Muaj Tseeb: # Nyeem PIR lub xeev tam sim no = GPIO.input (pinpir) # Yog PIR tau tshwm sim yog lub xeev tam sim no == 1 thiab lub xeev yav dhau los == 0: print ("Tsab ntawv tsa suab pom!") # Koj li IFTTT URL nrog lub npe txheej xwm, tus yuam sij thiab json tsis (qhov tseem ceeb) r = thov.post ('https://maker.ifttt.com/trigger /YOUR_EVENT_NAME/with/key/YOUR_KEY_HERE ', params = {"value1": "none", "value2": "none", "value3": "none"}) # Kaw lub xeev tshiab dhau los yav dhau los = 1 # Tos 120 vib nas this ua ntej looping ag ain luam tawm ("Tos 120 vib nas this") sijhawm.sleep (120) # Yog tias PIR tau rov qab los rau lub xeev tam sim no elif currentstate == 0 thiab lub xeev yav dhau los == 1: print ("Ready") yav dhau los state = 0 # Tos rau 10 milliseconds sijhawm.sleep (0.01) tshwj tsis yog KeyboardInterrupt: print ("Quit") # Reset GPIO settings GPIO.cleanup ()
Txaus siab rau!
Pom zoo:
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Ua Si Cov Khoom Ua Si Ua Tau Zoo!: 7 Cov Kauj Ruam (nrog Duab)
Hloov-Hloov Cov Khoom Ua Si: Cov Khoom Siv Hluav Taws Xob Ua Tau Zoo!: Qho khoom ua si hloov pauv qhib txoj hauv kev tshiab thiab kev daws teeb meem kom tso cai rau menyuam yaus uas muaj lub cev muaj peev xwm txwv lossis kev xiam oos qhab kev loj hlob los cuam tshuam nrog cov khoom ua si ntawm nws tus kheej. Hauv ntau qhov xwm txheej, cov menyuam yaus uas xav tau cov khoom ua si hloov pauv tsis tuaj yeem nkag mus
Cov av noo noo Cov Lus Qhia Tswj Xyuas Internet Txuas Cov Dej Dej (ESP32 thiab Blynk): 5 Cov Kauj Ruam
Cov av noo noo Cov lus pom zoo Tswj Xyuas Internet Txuas Cov Dej Dej (ESP32 thiab Blynk): Tsis txhawj xeeb txog koj lub vaj lossis nroj tsuag thaum koj mus rau hnub so ntev, lossis tsis nco qab ywg dej koj cov nroj tsuag txhua hnub. Zoo ntawm no yog kev daws teeb meem Nws cov av ya raws tswj hwm thiab thoob ntiaj teb txuas nrog cov dej txau dej tswj los ntawm ESP32 ntawm software pem hauv ntej kuv
Ua Cov Phiaj Xwm Zoo Los Ntawm Cov Ntaub Ntawv Nyob Arduino (thiab Txuag Cov Ntaub Ntawv rau Excel): 3 Cov Kauj Ruam
Ua Cov Phiaj Xwm Zoo Los Ntawm Cov Ntaub Ntawv Nyob Arduino (thiab Txuag Cov Ntaub Ntawv rau Excel): Peb txhua tus nyiam ua si nrog peb tus lej L … cov ntsiab lus tau ntxiv thiab nws tsis tshwj xeeb rau lub qhov muag. Arduino IDE cov phiaj xwm tsis
Cov Ntawv Cim Hluav Taws Xob LED Taws Teeb Cov Neeg Hlau Cov Ntawv Cim - Cov Khoom Siv Soldering: 11 Kauj Ruam
Cov Khoom Siv Hluav Taws Xob LED Taws Teeb Cov Neeg Hlau Daim Npav - Cov Khoom Siv Soldering: Kab lus no tau txaus siab txhawb nqa los ntawm PCBWAY.PCBWAY ua cov qauv zoo PCBs rau tib neeg thoob plaws ntiaj teb. Sim nws rau koj tus kheej thiab tau txais 10 PCBs rau tsuas yog $ 5 ntawm PCBWAY nrog qhov ua tau zoo heev, Ua tsaug PCBWAY. Robadge#1 uas kuv tau tsim rau
DIY: Qab nthab Mounted Mini Sensor Box Nrog Lub Hwjchim Motion Sensor: 4 Cov Kauj Ruam
DIY: Qab Nthab Mounted Mini Sensor Box Nrog Lub Hwjchim Motion Sensor: Nyob Zoo. Qee lub sij hawm dhau los kuv tau pab rau kuv tus phooj ywg nrog lub tswv yim ntse hauv tsev thiab tsim lub thawv me me sensor nrog tus qauv tsim uas tuaj yeem ntsia tau ntawm lub qab nthab rau hauv 40x65mm qhov. Lub npov no pab: • ntsuas lub teeb pom kev • ntsuas cov av noo