Cov txheej txheem:
- Kauj ruam 1: Teeb tsa Photon
- Kauj ruam 2: Tam sim no nyem nws nrog Code
- Kauj Ruam 3: Yog Qhov No Yog Li No (IFTTT) (IoT)
- Kauj Ruam 4: Internet yog Koj Tus Oyster
Video: Intro rau Particle Photon thiab IoT: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:28
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
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
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)
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
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:
Kev Ntsuas Kub thiab Vaum Siv SHT25 thiab Particle Photon: 5 Kauj Ruam
Kev Ntsuas Kub thiab Vaum Siv SHT25 thiab Particle Photon: Tsis ntev los no peb tau ua haujlwm ntau yam haujlwm uas xav tau kev ntsuas kub thiab av noo thiab tom qab ntawd peb tau pom tias ob qhov kev ntsuas no tau ua lub luag haujlwm tseem ceeb hauv kev kwv yees ntawm kev ua haujlwm tau zoo ntawm lub system. Ob leeg ntawm indus
Kev Ntsuas thiab Kev Ntsuas Kub Siv HIH6130 thiab Particle Photon: 4 Cov Kauj Ruam
Kev ntsuas cov av noo thiab ntsuas kub siv HIH6130 thiab Particle Photon: HIH6130 yog qhov ntsuas cua thiab ntsuas kub nrog cov zis digital. Cov ntsuas no muab qib raug ntawm ± 4% RH. Nrog kev lag luam-ua kom muaj kev ruaj ntseg mus sij hawm ntev, qhov tseeb kub-them nyiaj digital I2C, Kev lag luam ua rau muaj kev ntseeg siab, Kev siv hluav taws xob
Ntsuas Kub thiab Vaum Siv HDC1000 thiab Particle Photon: 4 Cov Kauj Ruam
Kev Ntsuas Kub thiab Vaum Siv HDC1000 thiab Particle Photon: HDC1000 yog lub ntsuas hluav taws xob digital nrog cov ntsuas kub ua ke uas muab ntsuas tau zoo heev ntawm lub zog qis heev. Cov cuab yeej ntsuas cov av noo raws li lub peev xwm tshiab sensor. Cov av noo thiab qhov ntsuas kub tau yooj yim
Kev Ntsuas thiab Kev Ntsuas Kub Siv HTS221 thiab Particle Photon: 4 Cov Kauj Ruam
Kev Ntsuas Cov Ntsuas thiab Kub Siv HTS221 thiab Particle Photon: HTS221 yog lub ntsuas hluav taws xob me me uas muaj peev xwm ntsuas tau qhov txheeb ze thiab qhov kub thiab txias. Nws suav nrog lub hauv paus ntsiab lus thiab cov teeb liab sib xyaw daim ntawv thov tshwj xeeb kev sib txuas (ASIC) los muab cov ntaub ntawv ntsuas los ntawm cov lej
3.3V Mod rau Ultrasonic Sensors (npaj HC-SR04 rau 3.3V Logic ntawm ESP32/ESP8266, Particle Photon, thiab lwm yam): 4 Kauj Ruam
3.3V Mod rau Ultrasonic Sensors (npaj HC-SR04 rau 3.3V Logic ntawm ESP32/ESP8266, Particle Photon, Etc.): TL; DR: Ntawm lub sensor, txiav cov kab rau Echo tus pin, tom qab ntawd txuas nws dua qhov faib hluav taws xob (Echo trace -> 2.7kΩ -> Echo pin -& 4.tkΩ -> GND) .Edit: Muaj qee qhov kev sib cav txog seb ESP8266 puas yog 5V zam rau GPIO hauv