Cov txheej txheem:

LTE Arduino GPS Tracker + IoT Dashboard (Ntu 2): 6 Cov Kauj Ruam (nrog Duab)
LTE Arduino GPS Tracker + IoT Dashboard (Ntu 2): 6 Cov Kauj Ruam (nrog Duab)

Video: LTE Arduino GPS Tracker + IoT Dashboard (Ntu 2): 6 Cov Kauj Ruam (nrog Duab)

Video: LTE Arduino GPS Tracker + IoT Dashboard (Ntu 2): 6 Cov Kauj Ruam (nrog Duab)
Video: Make Your Own GPS Tracker Using the AVR-IoT Cellular Mini 2024, Kaum ib hlis
Anonim
Image
Image
Teeb tsa ThingsBoard
Teeb tsa ThingsBoard

Intro & Ib feem 1 Rov sau dua

Yog lawm, nws yog lub sijhawm rau lwm qhov qhia hauv SIM7000 GPS tracker nrog Arduino thiab LTE! Yog tias koj tseem tsis tau muaj, thov mus hla qhov pib qhia rau Botletics SIM7000 CAT-M/NB-IoT daim ntaub thaiv ces nyeem ntawm Tshooj 1 ntawm GPS taug qab qhia. Raws li xws li, kuv yuav xav tias koj muaj txhua qhov kho vajtse teeb tsa thiab npaj txhij tshaj tawm cov ntaub ntawv mus rau huab txhua yam peb xav tau tiag tiag hauv qhov kev qhia no yog paub peb tus kheej nrog ThingsBoard thiab ua lwm txoj hauv kev sim kom pom cov ntaub ntawv zoo kawg qhia!

Hauv Ntu 1 peb ua tiav tau txais peb lub GPS zoo tracker xa cov ntaub ntawv mus rau dweet.io thiab nqa cov ntaub ntawv ntawm freeboard.io kom pom cov ntaub ntawv. Txawm li cas los xij, Kuv tau pom sai sai tias daim ntawv qhia kev ua haujlwm tau zoo heev ntawm lub freeboard txij li nws tsis tso cai rau koj txav tus cursor ib puag ncig lossis txawm tias hloov kho lub qhov rai widget. Qhov no coj kuv mus rau qhov kev daws teeb meem zoo dua: ThingsBoard.io uas yog super-awesome IoT dashboard (thiab pub dawb!) Uas tso cai rau koj khaws, pom kev, thiab kho qhov heck tawm ntawm koj cov ntaub ntawv! Koj tuaj yeem rub rov qab teeb tsa cov cuab yeej (thiab nws ua haujlwm hauv Chrome tsis zoo li lub freeboard), thiab tag nrho cov txiaj ntsig zoo yog qab zib ntawm cov qoob loo. Qhov tseem ceeb tshaj plaws, Google daim ntawv qhia huab cua tso cai rau koj txav mus los dawb, nthuav tawm thiab tawm, thiab xaiv qhov sib txawv (satellite, txoj kev pom, thiab lwm yam) thiab txawm tso cai rau koj rub thiab tso tus txiv neej daj me me mus rau txoj kev rau txoj kev pom !

Kauj ruam 1: teeb tsa ThingsBoard

Teeb tsa ThingsBoard
Teeb tsa ThingsBoard
Teeb tsa ThingsBoard
Teeb tsa ThingsBoard

ThingsBoard Account & Teeb Khoom

Thawj qhov koj yuav tsum tau ua yog mus rau ntawm ThingsBoard home page ces tsim tus as khauj los ntawm txhaj rau sab xis saum toj ntawv qhia zaub mov khawm thiab xaiv "Live Demo". Tsim tus as khauj, txheeb xyuas koj tus as khauj hauv email uas lawv xa tuaj rau koj, tom qab ntawd rov qab nkag mus rau Live Demo homescreen. Qhov no yuav tsum coj koj mus rau lub vijtsam uas koj tuaj yeem tswj hwm tag nrho koj cov cuab yeej, hloov kho dashboards, thiab lwm yam.

Tom ntej no, xaiv "Devices" tab ntawm sab laug. Qhov no yuav tsum coj los ua pawg ntawm cov cuab yeej siv ua piv txwv zoo li ESP8266, DHT22, Arduino thiab Pi demos, thiab lwm yam. Tom qab txhaj "ADD" koj yuav tsum pom koj lub cuab yeej tshiab hauv Devices tab. Nyem rau ntawm "Manage Credentials" thiab koj yuav tsum pom lub qhov rais me me tshwm tuaj qhia qhov khoom siv nkag mus token. Qhov no yog qhov tseem ceeb ntawm tus ID ntaus ntawv thiab zoo ib yam rau tus ID ntaus ntawv siv rau tshaj tawm cov ntaub ntawv rau dweet.io. Koj tuaj yeem hloov tus lej ntaus ntawv no mus rau tus lej IMEI ntawm koj daim ntaub thaiv yog tias koj xav tau, tab sis koj kuj tseem tuaj yeem siv tus cim cim pib-pib. Luam cov cim no raws li koj xav tau hauv Arduino kos duab.

Arduino Piv Txwv Teeb

Hauv qhov kev qhia no peb yuav siv qhov piv txwv zoo ib yam piv txwv Arduino kos duab zoo li hauv thawj qhov kev qhia tab sis lub sijhawm no kuv tau hloov kho cov duab kos kom suav nrog cov lej xa cov ntaub ntawv ncaj qha mus rau ThingsBoard.io hloov ntawm dweet.io hauv Tshooj 1. Raws li ib txwm muaj, koj tuaj yeem pom tus lej piv txwv ntawm no ntawm Github.

Thawj qhov koj yuav tsum tau ua yog tawm tswv yim tawm kab uas ua rau daim ntaub thaiv npog rau dweet.io:

// Tau txais kev thov/* // Koj tuaj yeem kho cov ntsiab lus ntawm qhov kev thov yog tias koj tsis xav tau qee yam xws li nrawm, qhov siab, thiab lwm yam sprintf (URL, "https://dweet.io/dweet/for/%s ? lat =%s & long =%s & speed =%s & head =%s & alt=%s & temp =%s & batt =%s ", imei, latBuff, longBuff, speedBuff, headBuff, altBuff, tempBuff, battBuff);

int counter = 0; // Qhov no suav cov naj npawb ntawm kev sim ua tsis tiav

// Sim tag nrho peb zaug yog tias qhov tshaj tawm tsis ua tiav (sim 2 zaug ntxiv) thaum (txee <3 &&! Fona.postData ("Tau", URL, "")) {// Ntxiv cov lus hais "" ua tus thib peb tawm tswv yim vim rau qhov tau txais kev thov tsis muaj "lub cev" Serial.println (F ("Ua tsis tiav rau xa cov ntaub ntawv, rov ua dua …")); txee ++; // Kev nce nqi ncua ntxiv (1000); } */

Tom ntej no, tsis-tawm kab lus uas tshaj tawm rau thingsboard.io:

// Cia peb sim POST thov mus rau yam khoom siv.io const char* token = "YOUR_DEVICE_TOKEN"; // Los ntawm thingsboard.io ntaus ntawv sprintf (URL, "https://demo.thingsboard.io/api/v1/%s/telemetry", token); sprintf (lub cev, "{" latitude / ":%s, \" longitude / ":%s, \" speed / ":%s, \" head / ":%s, \" alt / ":%s, / "temp \":%s, / "batt \":%s} ", latBuff, longBuff, speedBuff, headBuff, altBuff, tempBuff, battBuff); // sprintf (lub cev, "{" lat / ":%s, \" ntev / ":%s}", latBuff, longBuff); // Yog tias txhua yam koj xav tau yog lat/ntev

int counter = 0;

thaum (! fona.postData ("POST", URL, lub cev)) {Serial.println (F ("Ua tsis tiav HTTP POST …")); txee ++; ncua (1000); }

Tshaj tawm cov cai rau koj Arduino, xyuas kom tseeb tias koj muaj daim npav SIM thiab tus kav hlau txais xov txuas, thiab txheeb xyuas tias daim ntaub thaiv tau xa cov cai mus rau huab ua ntej mus!

NCO TSEG: Arduino Uno muaj lub cim xeeb tsawg heev (RAM) thiab tshaj tawm rau Thingsboard tuaj yeem ua rau Arduino tsoo. Yog tias koj ntsib kev rov pib dua ntawm daim duab kos ntawm thaj tsam ntawm postData () ua haujlwm lossis lwm yam kev coj txawv txawv, qhov ntawd feem ntau yuav muaj dab tsi tshwm sim. Qhov yooj yim kho rau qhov ntawd yog sib pauv tawm Uno nrog Arduino Mega lossis pawg thawj coj nrog ntau RAM. Koj tseem tuaj yeem sim txo qhov loj ntawm cov pawg thiab faib cov ntaub ntawv rau hauv ntau cov ntawv.

Kauj Ruam 2: Txheeb Xyuas Cov Ntaub Ntawv Txais

Txheeb Xyuas Cov Ntaub Ntawv Txais
Txheeb Xyuas Cov Ntaub Ntawv Txais

Txhawm rau txhawm rau txheeb xyuas qhov tseeb tias cov ntaub ntawv raug xa mus rau ThingsBoard raug, mus rau tib lub cuab yeej cov ntsiab lus nplooj ntawv (nyem rau ntawm GPS Tracker ntaus ntawv nplais hauv nplooj ntawv "Devices") tom qab ntawd nyem rau "Latest Telemetry" tab. Yog tias koj lub GPS tracker xa qhov tseem ceeb mus rau ThingsBoard koj yuav tsum pom qhov txiaj ntsig tshiab kawg ntawm no thiab lawv yuav hloov kho lub sijhawm tiag tiag thaum lawv nkag los.

Tam sim no koj tau txheeb xyuas tias ThingsBoard tau txais cov ntaub ntawv nws yog lub sijhawm los teeb tsa lub dashboard yog li peb tuaj yeem pom peb cov ntaub ntawv thaum thaum peb khaws nws! (Los yog tom qab qhov tseeb)

Kauj Ruam 3: Teeb tsa Dashboard

Teeb tsa Dashboard
Teeb tsa Dashboard
Teeb tsa Dashboard
Teeb tsa Dashboard
Teeb tsa Dashboard
Teeb tsa Dashboard

Tam sim no nws yog lub sijhawm rau kev lom zem! Tam sim no nyem rau "Dashboards" tab ntawm sab laug thiab xaiv koj li GPS tracker ntaus ntawv. Qhov no yuav tsum coj los rau nplooj ntawv tshiab uas nug koj kom ntxiv widgets. Nyem rau hauv qab txoj cai "+" khawm thiab "tsim tshiab widget" coj los rau hauv cov ntawv qhia zaub mov nco ntawm cov widget xaiv los ntawm. Txog tam sim no cia ntxiv "digital gauge". Xaiv qhov no yuav tsum thauj cov pawg saib ua ntej rau txhua hom sib txawv ntawm cov ntsuas ntsuas uas koj tuaj yeem xaiv los ntawm. Thaum koj nyem rau ntawm ib qho nws yuav coj mus rau lwm lub vijtsam rau koj kom teeb tsa lub cuab yeej ntsuas. Thawj qhov koj yuav tsum tau ntxiv yog cov ntaub ntawv khaws tseg (koj lub cuab yeej GPS tracker uas xa cov ntaub ntawv mus rau ThingsBoard). Nias lub pob "+ ADD" thiab xaiv koj li "GPS Tracker" ntaus ntawv thiab xaiv qhov sib txawv uas tsim nyog uas koj xav kom cov cuab yeej nthuav tawm. Hauv qhov no, cia peb xaiv qhov sib txawv "temp" (kub).

Tam sim no yog tias koj xav ntxiv yam xws li lub npe rau tus widget, mus rau hauv "Settings" tab, khij "Display title", thiab sau lub npe. Muaj ntau ntau yam uas koj tuaj yeem ua hauv qab "Advanced" tab tab sis kuv yuav cia koj tshawb xyuas cov ntawd rau koj tus kheej! Muaj kev lom zem hloov pauv tus nqi ib puag ncig, ntawv cim, xim, thiab ntau ntxiv! Tom qab ntxiv cov widget nws yuav tshwm nyob rau hauv qab sab laug ntawm koj lub dashboard (tej zaum koj yuav tsum tau nqes mus yog tias koj muaj ntau lub widget puv lub vijtsam). Koj tuaj yeem hloov kho tus widget txhua lub sijhawm los ntawm nias lub pob ntawm tus widget yog tias koj twb tau nyob rau hauv lub dashboard hloov hom, lossis nkag mus rau hom kev hloov kho los ntawm nias lub xaum khawm nyob hauv qab txoj cai ntawm tag nrho cov vijtsam ua ntej tso cai rau koj kho cov widgets. Zoo nkauj ncaj!

Kauj Ruam 4: Ntxiv Daim Ntawv Qhia

Ntxiv Daim Ntawv Qhia!
Ntxiv Daim Ntawv Qhia!
Ntxiv Daim Ntawv Qhia!
Ntxiv Daim Ntawv Qhia!
Ntxiv Daim Ntawv Qhia!
Ntxiv Daim Ntawv Qhia!
Ntxiv Daim Ntawv Qhia!
Ntxiv Daim Ntawv Qhia!

Tam sim no rau GPS tracker daim ntawv qhia yog qhov yuav tsum muaj! Cia peb ntxiv ib qho los ntawm kev tsim lub widget tshiab (hauv qab txoj cai "+" khawm dua) thiab lub sijhawm no nqes mus thiab xaiv "Maps". Mus tom ntej thiab nyem rau ntawm ib qho thiab nws yuav nthuav tawm cov kev xaiv rau nws. Ntxiv cov ntaub ntawv khaws tseg raws li ib txwm tab sis lub sijhawm no, xaiv ob qho "lat" thiab "ntev" hloov pauv vim nws yuav xav tau ob qho no kom tau txais qhov chaw. Tom ntej no, mus rau "Chaw" tab thiab ntawm no koj tuaj yeem teev sijhawm lub sijhawm ntawm cov ntaub ntawv los tso rau ntawm daim duab qhia chaw. Piv txwv li, koj tsuas xav tau 2 feeb kawg ntawm cov ntaub ntawv tshwm sim, lossis koj yuav xav tau txhua cov ntaub ntawv txij li nag hmo, lossis tej zaum koj tsuas xav tau lub qhov rai ruaj khov raws sijhawm (zoo li 2PM nag hmo txog 10AM hnub no).

Yog tias koj xav tau koj tuaj yeem mus rau "Advanced" tab thiab xaiv hom ntawv qhia chaw (txoj hauv kev, satellite, sib txuas, lossis thaj chaw). Tej zaum qhov tseem ceeb tshaj plaws ntawm txhua qhov no yog txhawm rau txheeb xyuas cov npe latitude thiab longitude ntev. Nco ntsoov tias cov npe no cuam tshuam nrog cov npe sib txawv uas koj tab tom xa mus rau ThingsBoard. Piv txwv li, yog tias koj daim duab Arduino hais tias nws xa "lat" thiab "long" variables (uas nws yog los ntawm lub neej ntawd) ces koj yuav tsum hloov cov npe tseem ceeb rau "lat" thiab "ntev" thiab siv "latitude" thiab "longitude" yuav tsis nqa koj cov ntaub ntawv!

Ib zaug ntxiv, tom qab ntxiv daim ntawv qhia nws yuav tshwm rau hauv qab ntawm lub dashboard. Tsuas yog rub nws kom rov muab nws tso rau ntawm lub dashboard thiab nyem thiab rub cov npoo kom hloov nws. Yog tias koj lub sij hawm cua daj cua dub raug teeb tsa kom raug koj yuav tsum pom koj qhov chaw tam sim no tshwm ntawm daim duab qhia chaw. Super huv si huh? Tam sim no peb tau npaj rau qhov kev sim tiag!

Kauj Ruam 5: Txoj Kev Xeem

Txoj Kev Xeem
Txoj Kev Xeem
Txoj Kev Xeem
Txoj Kev Xeem

Kuaj GPS tracker yog yooj yim heev! Tsuas yog ntsaws Arduino rau hauv lub tsheb USB adapter kom muaj zog rau nws, xyuas kom lub ntsuab LED qhib, thiab nws yuav tsum pib xa cov ntaub ntawv! Txhawm rau hloov tus qauv piv txwv ntawm GPS tracker kom paub tseeb tias koj pom kab ntawv ntawm tus lej hauv qhov piv txwv piv txwv:

#define samplingRate 10 // Lub sijhawm nyob nruab nrab ntawm cov ntawv, hauv vib nas this

thiab teeb nws rau txhua yam koj xav tau. Kuv pom tias 10s ua haujlwm tau zoo rau txoj kev xeem yooj yim, tab sis yog tias koj nrawm thiab npau taws tej zaum koj yuav xav tau tus nqi piv txwv ntau dua!

Kauj Ruam 6: Cov txiaj ntsig

Cov txiaj ntsig
Cov txiaj ntsig
Cov txiaj ntsig
Cov txiaj ntsig
Cov txiaj ntsig
Cov txiaj ntsig

Hauv cov duab saum toj no koj tuaj yeem pom kuv teeb tsa dashboard. Kuv ntxiv cov kab kos rau kab keeb kwm cov ntaub ntawv rau yam xws li nrawm, qhov siab, thiab ntsuas kub, thiab tseem suav nrog cov ntsuas ntsuas lub sijhawm tiag tiag yog tias kuv xav pom lawv ntawm lub sijhawm tiag tiag ntawm lwm txoj kev taug (duab no hauv RV!).

Daim ntawv qhia yog neeg tua neeg txaus ntshai thiab kuv tau tswj kom khaws qee cov ntaub ntawv raug qhov tseeb ntawm txoj kev kuv tau siv. Tsis tas li, cov ntaub ntawv nrawm yog qhov tseeb vim peb tsis tau tshaj li 40mph (daim duab yog kph) ntawm txoj kev hauv nroog. Ntau qhov kev hloov pauv ntawm qhov nrawm tuaj yeem piav qhia los ntawm cov teeb tsheb. Zuag qhia tag nrho, cov txiaj ntsig zoo thiab tsuas yog xav txog dab tsi ntxiv peb tuaj yeem siv qhov no rau! Koj tuaj yeem teeb tsa qhov no ntawm RV, maus taus, tsheb, thiab lwm yam thiab kom nws taug qab txhua lub sijhawm thiab rub cov txiaj ntsig ntawm ThingsBoard!

Los xaus, hauv qhov kev qhia no peb tau teeb tsa peb GPS tracker xa cov ntaub ntawv ncaj qha mus rau ThingsBoard ntawm HTTP POST thov thiab tswj cov ntaub ntawv ntawm lub dashboard. Koj tuaj yeem ntxiv ntau yam khoom siv thiab dashboards, txhua tus muaj ntau yam khoom siv uas zoo nkaus li txias thiab muaj ntau qhov kev xaiv ua raws! ThingsBoard tau ua pov thawj los ua qhov muaj zog heev (thiab pub dawb!) Cov cuab yeej los saib IoT cov ntaub ntawv thiab tseem muaj lwm qhov tshwj xeeb uas kuv tseem tsis tau khawb. Ua siab dawb ua si nrog nws thiab pom yam koj pom.

  • Yog tias koj nyiam qhov kev qhia no, ua rau koj tus kheej, lossis muaj lus nug, thov tawm lus hauv qab no!
  • Nco ntsoov muab Phau Ntawv Qhia no lub plawv thiab sau npe yuav ntawm no thiab ntawm kuv li YouTube channel rau ntau qhov txaus qhia txog Arduino ntsig txog kev qhia!
  • Yog tias koj xav txhawb qhov kuv ua, thov txiav txim siab yuav koj li Botletics SIM7000 daim ntaub thaiv ntawm Amazon.com!

Nrog qhov ntawd, kuv yuav ntsib koj tom ntej!

Pom zoo: