Cov txheej txheem:

Ntse B.A.L (txuas nrog Xa Ntawv Xa Ntawv): 4 Cov Kauj Ruam
Ntse B.A.L (txuas nrog Xa Ntawv Xa Ntawv): 4 Cov Kauj Ruam

Video: Ntse B.A.L (txuas nrog Xa Ntawv Xa Ntawv): 4 Cov Kauj Ruam

Video: Ntse B.A.L (txuas nrog Xa Ntawv Xa Ntawv): 4 Cov Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Hlis ntuj nqeg
Anonim
Ntse B. A. L (txuas nrog Mailbox)
Ntse B. A. L (txuas nrog Mailbox)

Koj nkees nkees ntawm kev tshuaj xyuas txhua lub sijhawm koj lub mailbox thaum tsis muaj dab tsi sab hauv. Koj xav paub yog tias koj tau txais koj li ntawv lossis pob khoom thaum mus ncig. Yog li ntawv xa ntawv txuas yog rau koj. Nws yuav ceeb toom koj yog tias tus neeg xa ntawv tau xa ntawv lossis xa khoom, ncaj qha rau koj lub xov tooj ntawm tes los ntawm email, ua tsaug rau cov thev naus laus zis tshiab LORAWAN ua hauv Fabkis. Peb tab tom mus ib kauj ruam yuav ua li cas thiaj tsim tau daim ntawv pov thawj thoob plaws qhov kev qhia no.

Kauj ruam 1: Cov khoom siv

Khoom siv
Khoom siv

Cov lus siv: C/C ++

Kev paub pib hauv digital electronics.

Yuav tsum tau kho vajtse:

Grove-3-Axis Digital Gyro:

Cov khoom siv sigfox module nrog kav hlau txais xov:

Nyem khawm thawb (xaiv yam koj xav tau).

Nucleo F030R8:

Software yuav tsum tau:

Lub khoos phis tawj nrog lub browser zoo los ua haujlwm nrog Mbed compiler.

Kauj ruam 2: Npaj Koj Lub Ntaus Ntawv

Npaj Koj Lub Ntaus Ntawv
Npaj Koj Lub Ntaus Ntawv

Ua ntej, peb yuav tsum txuas tag nrho cov qauv rau chip.

Hwj chim Sigfox module thiab lub gyroscope nrog 3.3voltage! Tom qab ntawd txuas UART xov hlau mus rau Sigfox module (PA_9, PA_10) thiab I2C xaim rau lub gyroscope (PB_10; PB_11). Txuas lub pob nrog PB_3 pins. thaum ua tiav, Sau cov cai hauv qab no.

Koj tuaj yeem sim tus qauv los ntawm kev tso lub gyro rau ntawm lub mailbox thiab tau txais qee qhov txiaj ntsig cuam tshuam nrog kev txav mus los thiab yog li txheeb xyuas seb nws puas yog pob ntawv uas tau tso nyiaj lossis ntawv.

#include "mbed.h" #include "ITG3200.h" // ---------------------------------- -// Hyperterminal configuration // 9600 bauds, 8-ntsis cov ntaub ntawv, tsis muaj qhov sib npaug // ------------------------------ ------ Serial pc (SERIAL_TX, SERIAL_RX); Serial sigfox (PA_9, PA_10, NULL, 9600); InterruptIn bouton (PB_3); ITG3200 gyro (PB_11, PB_10); volatile hauv app; int qhov tseeb = 0; Sijhawm t; AnalogIn batterie (A3); AnalogIn ref_batt (ADC_VREF); tsis muaj dab tsi lol () {pc.printf ("appui / r / n"); cov = 1; } /* void batt () {pc.printf ("batterie ua tau! / r / n"); }*/ int lub ntsiab () {int x, y, z; // Teeb bandwidth siab tshaj. gyro.setLpBandwidth (LPFBW_42HZ); char tsis [20]; bouton.fall (& lol); bouton.mode (PullDown); //batterie_faible.rise(&batt); //batterie_faible.mode(PullDown); pc.printf ("pib / r / n"); thaum (1) {app = 0; x = gyro.getGyroX (); y = gyro.getGyroY (); z = gyro.getGyroZ (); yog (x> 5000) {t.start (); pc.printf ("pib feeb / r / n"); thaum (t.read () <10); pc.printf ("fin temps / r / n"); //pc.printf("app= %d / r / n ", app); yog (app == 0) {sigfox.printf ("AT $ SF = 636f757272696572 / r / n"); // colis: 636f6c69732e202020 sigfox.scanf ("%s", tsis); pc.printf ("%s / r / n", tsis); } pc.printf ("fin yog / r / n"); t.stop (); t.reset (); } /* yog (batterie.read () <= (2.8* ref_batt.read () /1.23)) pc.printf ("batterie faible / r / n"); sigfox.printf ("AT $ SF = 636f757272696572 / r / n"); // colis: 636f6c69732e202020 tos (10); sigfox.printf ("AT $ P = 1"); tos (10); sigfox.printf ("AT $ P = 0 / r / n");*/}}

Kauj Ruam 3: Sib dhos PCB

Cov qauv ua ntej dhau los loj dhau los muab tso rau hauv lub thawv ntawv xa ntawv. Nov yog qee cov ntaub ntawv Gerber luam tawm koj lub Circuit Court thiab sib dhos koj cov khoom siv.

Kauj Ruam 4: Back-end Website

Back-end Website
Back-end Website
Back-end Website
Back-end Website

Peb tau ua raws li peb cov backend architecture ntawm IBM Cloud (IBM IoT Watson Platform thiab NodeRED) thiab ntawm API REST thov. IBM Cloud tau siv los tswj kev sib txuas lus ntawm ntau qhov sib txawv ntawm peb cov kab ke. Raws li koj tuaj yeem pom ntawm peb NodeRED ntws, peb tswj txhua qhov kev thov tau txais los ntawm Sigfox API (uas xa cov lus los ntawm peb lub cuab yeej) thiab los ntawm peb lub vev xaib Wix (rau npe rau lub cuab yeej tshiab). Tsis tas li, huab yog lub luag haujlwm xa email ceeb toom rau tus neeg siv khoom thiab rau npe rau tus neeg siv khoom tshiab uas nws cov ntaub ntawv yuav raug khaws cia hauv peb cov ntaub ntawv huab-based (MongoDB). Yog li, NodeRED ib txwm tswj hwm API REST thov thiab database nug (INSERT thiab SELECT) kom ntseeg tau tias qhov kev ceeb toom raug yuav raug xa mus rau tus neeg siv khoom raug raws sijhawm.

Pom zoo: