Cov txheej txheem:

MCU Kev Nkag Mus Siv Internet Ntawm IFTTT - Ameba Arduino: 3 Kauj Ruam
MCU Kev Nkag Mus Siv Internet Ntawm IFTTT - Ameba Arduino: 3 Kauj Ruam

Video: MCU Kev Nkag Mus Siv Internet Ntawm IFTTT - Ameba Arduino: 3 Kauj Ruam

Video: MCU Kev Nkag Mus Siv Internet Ntawm IFTTT - Ameba Arduino: 3 Kauj Ruam
Video: qhia nkag mu siv lwm tu facebook 2024, Kaum ib hlis
Anonim
MCU Kev Nkag Mus Siv Internet Ntawm IFTTT - Ameba Arduino
MCU Kev Nkag Mus Siv Internet Ntawm IFTTT - Ameba Arduino

Nkag mus rau kev pabcuam internet yog txoj haujlwm yooj yim rau lub cuab yeej ntse zoo li lub xov tooj hauv xov tooj, ntsiav tshuaj lossis PC, tab sis tsis yooj yim li ntawm microcontrollers vim nws feem ntau xav tau kev sib txuas zoo dua thiab ua haujlwm zoo. Txawm li cas los xij, peb yuav tshem tawm qhov hnyav ntawm txoj haujlwm mus rau IFTTT los pab peb ua tiav ntau yam kev pabcuam hauv internet tau yooj yim. Cov ntawv qhia no yuav qhia koj yuav siv IFTTT li cas los ua qhov ntawd.

Khoom siv

  • Peb x 1
  • Ib tus as khauj los ntawm https://ifttt.com/, txhawm rau nkag mus rau IFTTT cov kev pabcuam

Kauj Ruam 1: Taw qhia rau IFTTT

Taw qhia rau IFTTT
Taw qhia rau IFTTT
Taw qhia rau IFTTT
Taw qhia rau IFTTT
Taw qhia rau IFTTT
Taw qhia rau IFTTT

IFTTT, lub npe hu ua Yog Qhov No Yog Qhov ntawd, yog lub vev xaib thiab mobile app thiab kev pabcuam dawb hauv web los tsim cov applets, lossis cov saw ntawm cov lus yooj yooj yim. Lub applet tau tshwm sim los ntawm kev hloov pauv uas tshwm sim hauv lwm qhov kev pabcuam hauv web xws li Gmail, Facebook, Telegram, Instagram, Pinterest thiab lwm yam.

· Tsim Applet los ntawm IFTTT

Hauv ntej, peb tau txais ib qho piv txwv ntawm IFTTT Applet xa email rau tus tau txais tshwj xeeb.

Txhawm rau ua piv txwv, HTTP POST cov yam ntxwv ntawm ameba tau siv los tshaj tawm cov kev pabcuam webhook yooj yim uas tau txais los ntawm IFTTT Platform thiab tig los siv los ua kom teb (xa email).

Tom qab nkag mus hauv https://ifttt.com/, nyem Kuv Cov Applets los ntawm Sab saum toj.

Txheeb cov duab saum toj no kom ua raws cov kauj ruam.

Kauj Ruam 2: Teeb IFTTT ntawm Ameba MCU

Teeb IFTTT ntawm Ameba MCU
Teeb IFTTT ntawm Ameba MCU
Teeb IFTTT ntawm Ameba MCU
Teeb IFTTT ntawm Ameba MCU
Teeb IFTTT ntawm Ameba MCU
Teeb IFTTT ntawm Ameba MCU

· Tshaj tawm qhov pib ntawm Ameba

Thaum Applet tau npaj tiav hauv IFTTT dashboard, qhov piv txwv qhov kev zov me nyuam tuaj yeem tso rau ntawm Ameba board kom tshaj tawm HTTP thov.

1. Cov piv txwv txoj haujlwm nyob hauv daim nplaub tshev "HTTP_IFTTT_POST". Ua raws cov theem hauv qab no:

1) Nyem rau *.ino cov ntaub ntawv sab hauv cov nplaub tshev piv txwv muab hauv chav kawm los qhib qhov piv txwv nrog Arduino IDE.

2) Thaum qhov kev zov me nyuam tau qhib, hloov kho 3 cov khoom hauv qab no hauv kab ntawv txhawm rau ua kom txoj haujlwm ua haujlwm tau zoo.

Kho cov ntaub ntawv pov thawj wi-fi txhawm rau txuas rau Wi-nkaus hotspot lossis nkag mus rau qhov xav tau ntawm kev xaiv.

Hauv qab tus tswv lub npe teb, nkag mus rau lub npe hostname ntawm IFTTT kev pabcuam "txiag.ifttt.com"

hauv qab Txoj Kev, nkag mus rau EventName thiab qhov tseem ceeb teb "txhais // nrog/tus yuam sij/"

- Lub npe txheej xwm: Lub npe txheej xwm yuav tsum zoo ib yam li tau teev tseg hauv IFTTT applet. Hauv qhov piv txwv no, lub npe txheej xwm yog “test_event”

- Qhov tseem ceeb: muaj nyob hauv Webhook kev pabcuam hauv tus kheej IFTTT tus account. Saib cov kauj ruam tom ntej kom tau txais.

3) Yuav ua li cas kom tau tus yuam sij los ntawm cov ntaub ntawv tab ntawm Webhooks?

nrhiav Webhooks kev pabcuam hauv Cov Kev Pabcuam tab.

Ntawm Webhooks cov nplooj ntawv pabcuam, nyem rau ntawm Cov Ntawv Teev Npe ntawm lub kaum sab xis saum toj.

Tus yuam sij tuaj yeem pom hauv nplooj ntawv cov ntaub ntawv. Tsis tas li, yuav thov siv HTTP li cas raws li qhia

Kauj ruam 3: Coding thiab Khiav

Coding thiab Khiav
Coding thiab Khiav
Coding thiab Khiav
Coding thiab Khiav
Coding thiab Khiav
Coding thiab Khiav

Tus qauv ntawm txoj cai ua tiav yog qhia saum toj no

Tam sim no cia peb ua qhov qauv piv txwv ntawm Ameba

Thaum tus piv txwv tau npaj tiav, txuas rau Ameba board ntawm USB Cable.

Sau cov cai. Nyem rau ntawm "Sketch" -> "Verify/Compile" ntawm Arduino. Thaum ua tiav, "Ua tiav kev suav sau" yuav raug hais kom nyob hauv qab ntawm Arduino.

Upload (flashed) cov cai rau Ameba los ntawm txhaj rau "Sketch" -> "Upload". (Cov txheej txheem uploading yuav qhia los ntawm kev tivthaiv D3 uas yuav ntsais muag ntawm lub rooj tsavxwm)

Thaum qhov kev xa tiav tiav (tivthaiv D3 ntawm lub rooj tsavxwm yuav tsum nres flashing), "upload tiav" yuav pom nyob rau hauv qab ntawm Arduino IDE qhov rai

Qhib tus saib xyuas.

Nias lub pob "Pib dua" kom pom cov cav tso tawm.

Tom qab qhov xwm txheej tau ua tiav raug rho tawm haujlwm, kab ntawm "Zoo siab! Koj tau rho tawm qhov kev tshwm sim test_event "tuaj yeem pom ntawm tus saib xyuas thiab email ceeb toom rau qhov xwm txheej no yuav xa tuaj.

Tom qab ntawv xa email mus rau tus neeg txais email tus lej sau npe ntawm IFTTT Applet thiab yuav ceeb toom email.

Pom zoo: