Cov txheej txheem:

Hws noo Sensor Siv Particle Photon: 6 Kauj Ruam
Hws noo Sensor Siv Particle Photon: 6 Kauj Ruam

Video: Hws noo Sensor Siv Particle Photon: 6 Kauj Ruam

Video: Hws noo Sensor Siv Particle Photon: 6 Kauj Ruam
Video: Shiv - sati VM || Shiv sati love video song || Full Video 2024, Kaum ib hlis
Anonim
Hws noo Sensor Siv Particle Photon
Hws noo Sensor Siv Particle Photon
Hws noo Sensor Siv Particle Photon
Hws noo Sensor Siv Particle Photon

Taw qhia

Hauv qhov kev qhia no peb tab tom tsim lub ntsuas cua noo siv lub Particle Photon thiab nws nyob hauv txaj lossis/thiab sab nraud WiFi kav hlau txais xov. Lub zog ntawm WiFi yog nyob ntawm qhov muaj dej noo hauv huab cua thiab hauv av. Peb siv lub hauv paus ntsiab lus no los ntsuas cov av noo.

Kauj Ruam 1: Tshooj Npe

  1. WiFi router

    Lub router yuav tsum nyob ze rau Photon kom tau txais txiaj ntsig zoo tshaj plaws

  2. Particle Photon

    Peb siv qhov no los xa cov ntaub ntawv mus rau huab

  3. Breadboard lossis ib yam dab tsi los tiv thaiv Photons pins
  4. Cov ntaub ntawv tsis muaj dej

    • Cov ntaub ntawv tiv thaiv Photon thiab lub txhab nyiaj hluav taws xob los ntawm cov av thiab noo.
    • Nws yuav tsum loj txaus rau ob lub photon thiab lub txhab nyiaj
  5. Lub txhab nyiaj fais fab lossis lub hwj chim

    Koj tuaj yeem siv lub txhab nyiaj fais fab twg haum rau hauv koj rooj plaub, lub peev xwm siab dua txhais tau tias koj tuaj yeem siv lub ntsuas kom ntev dua

  6. Kav hlau txais xov sab nraud (yeem

    Koj tuaj yeem siv qhov no txhawm rau nce WiFi zog

Kauj ruam 2: Pib

Nco ntsoov tias koj tau teeb tsa photon los ntawm kev ua raws cov lus qhia ntawm Photon lub vev xaib:

Yeem:

Txuas tus kav hlau txais xov sab nraud raws li qhia hauv Photon phau ntawv qhia

Kauj Ruam 3: Kauj Ruam 1: Sau Cov Ntaub Ntawv

Tam sim no peb tab tom sau cov ntaub ntawv nrog lub txhab nyiaj hluav taws xob, photon thiab xaiv tau lub kav hlau txais xov sab nraud

Kauj ruam 4: Txoj Cai

// lub sijhawm, hauv milliseconds, ntawm kev ntsuas.

// vim koj tsis tuaj yeem tshaj tawm ntau yam xwm txheej, qhov no tau dhau los tsawg kawg 1000

int delayTime = 15000;

Txoj hlua eventName1 = "WifitestIN"; Txoj hlua eventName2 = "WifitestEX"; teeb tsa tsis muaj dab tsi () {// tsis muaj dab tsi los ua ntawm no} void loop () {// ua qhov ntsuas: nyeem tus nqi los ntawm tus kav hlau txais xov sab hauv WiFi.selectAntenna (ANT_INTERNAL); int ntsuas 1 = WiFi. RSSI (); // tshaj tawm qhov no mus rau Huab Cua Particle.publish ("Sab Hauv", (Txoj hlua) ntsuas 1); // tos rau ncua sijhawmTus nqi ntawm milliseconds

ncua (delayTime);

// ua qhov ntsuas: nyeem tus nqi los ntawm tus kav hlau txais xov sab nraud WiFi.selectAntenna (ANT_EXTERNAL); int ntsuas 2 = WiFi. RSSI (); // tshaj tawm qhov no mus rau Huab Cua Particle.publish ("Sab Nraud", (Txoj hlua) ntsuas 2); // tos rau ncua sijhawmTus nqi ntawm milliseconds

ncua (delayTime);

Kauj ruam 5: Faus lub Sensor

Txij ntawm no mus, Particle yuav tsum tshaj tawm cov ntaub ntawv ntawm lub sijhawm teev tseg hauv cov cai.

Tam sim no koj tuaj yeem tawm sab nraud thiab nrhiav qhov chaw zoo los faus cov cuab yeej.

Nws yuav tsum nyob hauv thaj tsam ntawm koj li wifi thiab ze rau hauv av uas koj xav ntsuas.

Koj yuav tsum txheeb xyuas qhov kev sib txuas tas li thaum tso lub cuab yeej.

Thaum faus koj yuav tsum tam sim no tuaj yeem pom qhov hloov pauv ntawm lub teeb liab lub zog thaum los nag.

Kauj Ruam 6: Kev Txheeb Xyuas Cov Ntaub Ntawv

Tam sim no koj muaj cov ntaub ntawv los rau hauv lub dashboard me me uas tsis suav nrog.

Txhawm rau ntsuas cov ntaub ntawv no koj tuaj yeem xaiv mus nrog ob txoj hauv kev.

  1. Tsawg tus neeg

    Txog txoj hauv kev no koj nkag mus rau cov ntaub ntawv thiab saib qhov sib txawv ntawm cov ntaub ntawv tom qab thiab ua ntej los nag. Qhov no muab qhov ntsuas qhov tseeb tsawg ntawm qhov cov ntsiab lus noo noo ntau npaum li cas

  2. Qhov tseeb dua

    Rau txoj hauv kev no koj qiv lossis ntiav tus neeg ntsuas qhov ntsuas qhov ntsuas siab kom ntsuas koj li lub ntsuas pa diy qhov no muab cov ntaub ntawv raug ntau dua piv rau thawj txoj hauv kev

Pom zoo: