Cov txheej txheem:
- Kauj Ruam 1: Yam Peb Xav Tau
- Kauj ruam 2: Sib dhos
- Kauj Ruam 3: Nruab Qhov Teeb Ntawm Lub Qhov Rooj
- Kauj Ruam 4: Rub tawm thiab Nruab Lub Tsev Qiv Ntawv ntawm Arduino
- Kauj ruam 5: Arduino Code
- Kauj Ruam 6: Ua Ntawv Pov Thawj Ua Haujlwm
Video: Arduino, Saib Xyuas Qhov Rooj-Qhib Ntawm Gmail: 6 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Hauv qhov kev qhia no, Kuv yuav qhia koj yuav ua li cas txhawm rau txheeb xyuas lub qhov rooj qhib qhov rooj thiab xa ntawv ceeb toom ntawm Gmail siv Arduino Uno.
Yog tias koj yog tus pib, koj tuaj yeem kawm paub txog wifi thiab sensor hauv Arduino - WiFi thiab Arduino - Qhov Rooj Sensor qhia.
Cia peb pib!
Kev Tshawb Nrhiav Qhov Rooj-Qhib Kev tshwm simMagnetic sensor Kuv siv suav nrog ob ntu: sensor thiab hlau nplaum. Thaum ob ntu nyob sib ze, tus pin tso tawm ntawm lub sensor yog HIGH, txwv tsis pub tus pin tso tawm yog LOW. Ua kom zoo dua ntawm cov yam ntxwv no, Kuv tau teeb tsa ib feem ntawm lub ntsuas cua ntawm lub qhov rooj nplooj thiab lwm qhov ntawm lub qhov rooj. Los ntawm kev txheeb xyuas lub xeev ntawm tus pin tso tawm, peb tuaj yeem tshawb pom thaum lub qhov rooj qhib thiab tom qab ntawv ceeb toom lossis xa ntawv ceeb toom.
Teem Sijhawm
Thaum qhov rooj qhib qhov rooj tshwm sim, ceeb toom xa los ntawm Gmail.
Kauj Ruam 1: Yam Peb Xav Tau
1. Arduino UNO lossis Genuino UNO
2. PHPoC Shield rau Arduino
3. Sib nqus Sensor
Kauj ruam 2: Sib dhos
1. Tshooj PHPoC Shield ntawm Arduino.
2. Txuas LAN cable rau daim ntaub thaiv rau Ethernet.
3. Pin thaiv ntawm Arduino thiab Sensor.
---- 5v -------- liab pin.
---- A0 ------- tus pin dub.
Kauj Ruam 3: Nruab Qhov Teeb Ntawm Lub Qhov Rooj
1. Txuas lub sensor ntu, teeb tsa Arduino (suav nrog PHPoC ntaub thaiv npog) rau lub qhov rooj
2. Muab cov hlau nplaum tso rau ntawm nplooj qhov rooj.
3. Hwj chim Arduino
4. Txuas rau Internet ntawm LAN cable lossis USB Wifi Dongle.
Kauj Ruam 4: Rub tawm thiab Nruab Lub Tsev Qiv Ntawv ntawm Arduino
Nruab PHPoC thiab ezButton lub tsev qiv ntawv
Kauj ruam 5: Arduino Code
#suav nrog
#suav nrog PhpocEmail email; ezButton khawm (A0); // tsim khawm khoom uas txuas rau tus pin A0; teeb tsa tsis muaj dab tsi () {Serial.begin (9600); Phpoc.begin (PF_LOG_SPI | PF_LOG_NET | PF_LOG_APP); //Phpoc.beginIP6 (); tsis pom zoo cov kab no yog tias koj yuav siv IPv6 khawm.setDebounceTime (100); // teeb tsa lub sijhawm debounce rau 100 milliseconds} void loop () {button.loop (); // YUAV TSUM hu lub voj () ua haujlwm ua ntej yog (khawm.isPressed ()) {// yog lub qhov rooj qhib … email.setOutgoingServer ("smtp.gmail.com", 587); email.setOutgoingLogin ("Google ID", "Google Password"); email.setFrom ("Gmail chaw nyob", "Tus Neeg Xa Npe"); email.setTo ("Tus tau txais email chaw nyob", "Tus Txais Lub Npe"); email.setSubject ("Qhov rooj tau qhib. [#905]"); // Mail Subject // Mail Contents email.beginMessage (); email.println ("#905"); email.println (""); email.println ("Qhov rooj tau qhib."); email.endMessage (); yog (email.send ()> 0) // Xa Email Serial.println ("Koj li Mail tau xa tiav"); lwm yam Serial.println ("Koj li Mail tsis xa tuaj"); } lwm yog (button.isReleased ()) {// yog lub qhov rooj raug kaw… // Sau cov lej ib yam nkaus}}
Kauj Ruam 6: Ua Ntawv Pov Thawj Ua Haujlwm
- voj ()
- teeb ()
- Serial.begin ()
- Serial.println ()
- ncua ()
- rau lub voj
- thaum lub voj
- yog lwm tus
- String.toInt ()
Pom zoo:
DIY Ntse Qhov Rooj Qhov Rooj Qhov Rooj + Tsev Pabcuam Hauv Tsev: 5 Kauj Ruam
DIY Ntse Lub Qhov Rooj Qhov Rooj + Lub Tsev Pabcuam Kev Sib Koom: Tig koj lub qhov rooj qhov rooj ib txwm ntse siv qhov haujlwm DIY no. Kuv yuav qhia koj yuav tsim nws li cas thiab tswj nws siv Tsev Pabcuam (dhau MQTT) thiab muaj peev xwm qhib thiab kaw koj lub qhov rooj ntawm qhov chaw deb.Kuv yuav siv ESP8266 pawg thawj coj hu ua Wemos
ESP32 Raws M5Stack M5stick C Huab Cua Saib Nrog DHT11 - Saib Xyuas Qhov Kub Kub & Qhov Kub Kub ntawm M5stick-C Nrog DHT11: 6 Cov Kauj Ruam
ESP32 Raws M5Stack M5stick C Huab Cua Saib Nrog DHT11 | Saib Xyuas Qhov Kub thiab Qhov Ntsuas Kub ntawm M5stick-C Nrog DHT11: Nyob zoo cov neeg, hauv cov lus qhia no peb yuav kawm paub yuav ua li cas cuam tshuam DHT11 ntsuas kub nrog m5stick-C (pawg tswj hwm kev txhim kho los ntawm m5stack) thiab tso tawm ntawm cov zaub ntawm m5stick-C. Yog li hauv qhov kev qhia no peb yuav nyeem qhov ntsuas kub, av noo & heat kuv
Tig Koj Lub Qhov Rooj Qhov Rooj Mus Rau Hauv Qhov Rooj Ntse Nrog Nrog IFTTT: 8 Kauj Ruam
Tig Koj Lub Qhov Rooj Qhov Rooj Mus Rau Hauv Lub Ntsej Muag Qhov Rooj Nrog IFTTT: Lub WiFi Qhov Rooj Tswb tig koj lub qhov rooj uas twb muaj lawm mus rau hauv lub qhov rooj ntse. https://www.fireflyelectronix.com/product/wifidoor
Tig Koj Lub Qhov Rooj Hauv Qhov Rooj Mus Rau Hauv Qhov Rooj Ntse Nrog Lub Tsev Pabcuam: 6 Kauj Ruam
Tig Koj Lub Qhov Rooj Qhov Rooj Mus Rau Hauv Qhov Rooj Ntse Nrog Tus Pab Hauv Tsev: Hloov koj lub qhov rooj uas twb muaj lawm mus rau hauv lub qhov rooj ntse. Tau txais kev ceeb toom rau koj lub xov tooj lossis ua ke nrog koj lub koob yees duab lub qhov rooj uas twb muaj lawm kom tau txais daim duab lossis video ceeb toom txhua lub sijhawm ib tus neeg hu koj lub tswb
Tsis Siv Neeg Teeb Txuas nrog Qhov Rooj thiab Qhov Rooj Saib Xyuas: 5 Kauj Ruam
Tsis Siv Neeg Teeb Txuas nrog Lub Qhov Rooj thiab Qhov Rooj Saib Xyuas: Nws zoo li nyuaj rau nrhiav lub rooj hloov pauv hauv qhov tsaus ntuj tab sis txoj haujlwm no yeej pab tau daws qhov teeb meem no. Ua raws cov theem hauv qab no kom paub qhov kev daws teeb meem ntawm qhov no