Cov txheej txheem:

Intro rau Particle Photon thiab IoT: 4 Kauj Ruam
Intro rau Particle Photon thiab IoT: 4 Kauj Ruam

Video: Intro rau Particle Photon thiab IoT: 4 Kauj Ruam

Video: Intro rau Particle Photon thiab IoT: 4 Kauj Ruam
Video: Niam pog zais siab 7/11/2018 2024, Kaum ib hlis
Anonim
Intro rau Particle Photon thiab IoT
Intro rau Particle Photon thiab IoT

Cov particle photon yog ib qhov tshiab tshaj plaws, thiab hauv kuv lub tswv yim, cov laug cam txhim kho txias tshaj plaws nyob ntawd. Nws muaj WiFi sib koom ua ke thiab RESTful API uas tso cai rau koj yooj yim cuam tshuam nrog pawg thawj coj, thiab koj tseem tuaj yeem txuas nws rau IFTTT.

Kauj ruam 1: Teeb tsa Photon

Teeb tsa Photon
Teeb tsa Photon
Teeb tsa Photon
Teeb tsa Photon
Teeb tsa Photon
Teeb tsa Photon

Nqe lus no yuav mus ib kauj ruam-ib-kauj ruam kom ntseeg tau tias koj tuaj yeem tau txais koj cov photon txuas nrog.

Pib los ntawm rub tawm dawb Particle Photon app los ntawm lub khw app.

Qhov thib ob, sau npe nrog Particle.io.

Qhov thib peb, xyuas kom koj lub cuab yeej txuas nrog Is Taws Nem.

Plaub, Nias "Teeb Photon" thiab ntaus tom ntej.

Thib tsib, Tsev-khawm rau koj cov chaw thiab mus rau Wi-nkaus. Nrhiav Photon-XXXX (XXXX yuav yog cov cim random)

Thib rau, Txuas rau nws.

Xya, Thaum tsim kev sib txuas, rov qab mus rau lub app.

Yim, Xaiv qhov koj xav tau Wi-nkaus taw tes rau kev sib tham nrog internet

Cuaj, Sau koj tus Passcode

Kaum, Txaus siab rau koj cov photon tshiab sau npe rau koj tus as khauj.

Kauj ruam 2: Tam sim no nyem nws nrog Code

Tam sim no nyem nws nrog Code!
Tam sim no nyem nws nrog Code!
Tam sim no nyem nws nrog Code!
Tam sim no nyem nws nrog Code!

Mus rau qhov txuas no-

Thaum koj nkag mus, nws yuav coj koj mus rau nplooj ntawv uas koj tuaj yeem nkag mus rau koj tus lej, lossis nyem qhov piv txwv.

Thawj thawj tus coders, Kuv pom zoo nyem qhov "Blink an LED" piv txwv khawm uas Particle zoo muab.

Rau txhua yam koj ua tau zoo nyob ntawd, nws nyob ntawm koj tam sim no. Nco ntsoov tias lub photon tau flashed hla huab, thiab tsis yog los ntawm USB txuas, yog li lub zog WiFi muaj txiaj ntsig ib txwm yog qhov zoo, yog tias koj xav kom koj lub khoos phis tawj hloov tshiab sai dua, thiab koj cov lej rub tawm sai dua.

Txhawm rau teeb tsa/nyem koj cov cai, lossis tus lej piv txwv, nyem lub pob hluav taws xob nyob rau sab saud

Kauj Ruam 3: Yog Qhov No Yog Li No (IFTTT) (IoT)

Yog Qhov No Yog Li No (IFTTT) (IoT)
Yog Qhov No Yog Li No (IFTTT) (IoT)
Yog Qhov No Yog Li No (IFTTT) (IoT)
Yog Qhov No Yog Li No (IFTTT) (IoT)
Yog Qhov No Yog Li No (IFTTT) (IoT)
Yog Qhov No Yog Li No (IFTTT) (IoT)

Nov yog txoj hauv kev txias los tshuaj xyuas qhov sib txawv ntawm koj li Particle Photon.

Ua ntej, ntxiv cov cai no rau koj lub cuab yeej, sab nraum thiab saum toj ntawm qhov tsis muaj teeb tsa.

int x = 0; // sib txawv

Qhov thib ob, ntxiv cov cai no rau koj lub cuab yeej, sab hauv thiab txhua qhov chaw ntawm qhov tsis muaj teeb meem

Particle.variable ("x", x); // Nov yog cov cai uas tau saib xyuas koj qhov sib txawv thiab ua rau REST nkag tau.

Tam sim no, mus rau

Nyem "Sau Npe".

Tom ntej no, nyem rau "Kuv Daim Ntawv Qhia" nyob rau sab saum toj ntawm nplooj ntawv.

Tom qab ntawd, nyem "Tsim Daim Ntawv Qhia".

Tom qab ntawd, nyem rau hauv kab tshawb thiab tshawb "Particle" Thaum koj nyem nws, nws yuav nug koj kom txuas Particle rau koj tus lej IFTTT. Qhov no tsuas yog txhais tau tias koj yuav tsum tau kos npe rau hauv thiaj li IFTTT tuaj yeem pom koj cov ntaub ntawv sib txawv.

Tom ntej no, nyem rau "Txheeb xyuas qhov sib txawv" Xaiv qhov sib txawv uas koj xav tshuaj xyuas thiab tseem xaiv tus nqi los sib piv tiv thaiv, thiab txoj kev sib piv. txoj kev sib txawv.)

Tam sim no nyem "Tsim Trigger".

Tam sim no, yog tias koj xav tau qhov kev txiav txim xa email rau koj, tshawb "email" hauv lub thawv.

Tom qab ntawd, nyem rau "Email" icon.

Koj yuav tuaj yeem hloov cov lus. IFTTT kuj suav nrog cov khoom zoo ib yam hauv lawv li email, uas tso cai rau koj xa cov ntaub ntawv hloov pauv. Qee qhov cim npe no yuav pom hauv kev xa ntawv.

Nias "Tsim daim ntawv qhia"

Voilà! koj tau tsim IFTTT Internet of Things txuas. Koj tuaj yeem cuam tshuam yuav luag txhua yam internet cuam tshuam nrog kev hloov pauv ntawm koj lub rooj tsavxwm. Koj tseem tuaj yeem xa tweet!

Kauj Ruam 4: Internet yog Koj Tus Oyster

Internet yog Koj Tus Oyster
Internet yog Koj Tus Oyster

Koj tuaj yeem txiav txim siab yuav ua dab tsi txij tam sim no. Yuav luag txhua qhov Arduino code sau rau ntawm lub cuab yeej zoo me me no. Kuv pom zoo txheeb xyuas qhov txuas no -

Kuv yuav tshaj tawm cov lus qhia ntxiv rau Dev Dev Pawg Zoo hauv lub neej yav tom ntej, thiab cia siab tias yuav ua haujlwm nrog zej zog Qhia tau zoo Ib zaug ntxiv, Ua tsaug rau kev nyeem ntawv, thiab rau kev thuam thuam tus phooj ywg. Yog tias koj tsis muaj Photon, txheeb xyuas qhov txuas no -

Kuv tsis yog lub luag haujlwm rau qhov kev puas tsuaj uas Cov Lus Qhia no yuav ua rau. Kuv tsis muaj peb daim duab no.

Pom zoo: