I-Arduino GPS: indawo kunye nokuma

IArduino GPS

Nge ibhodi yophuhliso I-Arduino inokuqhuba ubuninzi beeprojekthi, umda uhlala uyinto yokucinga. Ne izinto ze-elektroniki kunye neemodyuli, ukusebenza kungongezwa ukuze ukwazi ukwenza izinto ezingaphezulu. Enye yezi zinto zinokubakho Khangela izinto okanye abantu, okanye ufumane ngokumisa ngeArduino GPS.

Olu hlobo ukubeka kunye nokulandelela inokwenziwa kusetyenziswa iRFID okanye abafumanayo njengale siza kuxoxa ngayo kweli nqaku. Ngale nto uya kuba nakho ukwenza uninzi lweeprojekthi, ukusuka kwimidlalo yokwenza umtshini kunye nokufumana izinto, ukufumana izinto ezibiweyo, ukuze ukwazi ukuzifumana usebenzisa iGPS, njl.

Imodyuli yeArduino NEO-7 yeGPS

I-NEO-6 GPS yeArduino

Ukuba ne-Arduino GPS, ungasebenzisa ifayile ye Izixhobo ze-NEO-6, usapho olwenziwe ngu-U-Blox kwaye olunokudityaniswa kwibhodi yeArduino ngendlela elula. Ukongeza, banonxibelelwano olupheleleyo, kunye ne-UART, SPI, I2C, kunye ne-USB, ukongeza ekuxhaseni i-NMEA, i-UBX ye-binary kunye ne-RTCM protocols.

Ukongeza, le Arduino GPS ene-NEO-6 ikwavumela ukuba unciphise ubungakanani beprojekthi yakho, kuba ine isayizi encinci, kunye nexabiso eliphantsi. Ngokumalunga nokusetyenziswa, incinci nayo. Xa ukwimo esebenzayo, iya kufuna kuphela i-37mA. Inikwe amandla yi-2.7 ukuya kwi-3.6V yeemodeli ze-NEO-6Q kunye ne-NEO-6M, ngelixa zikhona ezinye zombane ophantsi obizwa ngokuba yi-NEO-6G odinga kuphela phakathi kwe-1.75 kunye ne-2v.

Ukuba zidityanisiwe imodyuli, iya kubandakanya umbane ombane eya kuthi ivumele ukuyinika amandla ngokuthe ngqo kunxibelelwano lweArduino 5v
.

Ezinye iiparameter ezinomdla zale modyuli zezi:

  • Imizuzwana engama-30 ixesha lokutshaya kuyabanda, kunye nomzuzwana omnye kuphela ukuqala okutshisayo.
  • La ubuninzi bemilinganiselo yokulinganisa basebenza kwi-5Hz kuphela.
  • Ukuchaneka kwendawo of 2.5 yeemitha yomahluko.
  • Ukuchaneka kwesantya 0.1 m / s.
  • Umahluko wokuziqhelanisa ka-0.5º kuphela.

Uyithengela phi i-NEO-6 yeArduino GPS

Ungazifumana ezi zixhobo kunye neemodyuli kwiivenkile ezininzi ezikhethekileyo ze-elektroniki, okanye kwiAmazon. Umzekelo, apha unako yithenge ngexabiso eliphantsi kakhulu:

Umzekelo kunye noArduino

Iscreen seArduino IDE

Uyakwazi ukufumana okungakumbi malunga neprogram kunye neArduino kunye nekhosi ye-PDF yamahhala onokuyenza khuphela apha.

Into yokuqala ekufuneka uyenzile ukuyidibanisa kwibhodi yakho yophuhliso kwaye uneArduino GPS yakho kukuqhagamshela imodyuli yakho ye-NEO-6 ebhodini. Inkqubo ye- Unxibelelwano zenziwe ngokulula kakhulu (unxibelelwano ngemodyuli ye-NEO-6 -Udibaniso lweArduino):

  • I-GND-GND
  • I-TX-RX (D4)
  • I-RX-TX (D3)
  • Vcc - 5V

Nje ukuba uqhagamshele, kuya kufuneka ukhuphele ifayile ye Ithala leencwadi leSoftSerial kwi-IDE yakho yeArduino, njengoko iya kufuneka kunxibelelwano lwe-serial. Kungenzeka ukuba sele unayo kwezinye iiprojekthi, kodwa ukuba akunjalo, kuya kufuneka khuphela kwaye ufake kwi-IDE yakho.

Nje ukuba yenziwe, ungaqala ngekhowudi yakho elula yokwenza ufundo. Umzekelo, kuba iinkqubo ezininzi zinokusetyenziswa, nanku umzobo yeNMEA:

#include <SoftwareSerial.h>

const int RX = 4;
const int TX = 3;

SoftwareSerial gps(RX, TX);

void setup()
{
   Serial.begin(115200);
   gps.begin(9600);
}

void loop()
{
   if (gps.available())
   {
      char data;
      data = gps.read();
      Serial.print(data);
   }
}

Ewe unokwenza uhlengahlengiso lwakho okanye usebenzise ezinye iiprotocol ukuba unqwenela ... Kodwa, ngaphambi kokuphelisa inqaku, kuya kufuneka uyazi ukuba Ifomathi yeNMEA (I-National Marine Electronics Asociation) ibaluleke kakhulu, ukuze uyiqonde, kuya kufuneka uyazi is syntax yayo:

$ GPRMC, hhmmss.ss, A, llll.ll, a, yyyy.yy, a, vv, xx, ddmmyy, mm, a * hh

Oko kukuthi, i- $ GPRMC ilandelwa luthotho lwe Iiparameter ezibonisa indawo:

  • zamza.ss: lixesha le-UTC ngeyure, imizuzu kunye nemizuzwana.
  • Ainqanaba lokwamkela, apho A = Kulungile kunye V = isilumkiso.
  • llll.ll, ukuyaUbubanzi, apho i-N inokuba ngu-S okanye u-S, emantla okanye emazantsi.
  • yyyy.yy, a: ubude. Kwakhona kunokuba ngu-E okanye u-W, oko kukuthi, empuma okanye entshona.
  • vv: isantya kumaqhina.
  • xx: le yikhosi ngeedigri.
  • mzmdzi: ngumhla we-UTC, ngeentsuku, iinyanga kunye nonyaka.
  • mm, a: Umahluko wamagnetic ngokweedigri, kwaye u-a angaba ngu-E okanye u-W empuma okanye entshona.
  • * H H: Checksum okanye checksum.

Umzekelo, unokufumana into enje:

$GPRMC,115446,A,2116.75,N,10310.02,W,000.5,054.7,191194,020.3,E*68


Yiba ngowokuqala ukuphawula

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa. ezidingekayo ziphawulwe *

*

*

  1. Uxanduva lwedatha: UMiguel Ángel Gatón
  2. Injongo yedatha: Ulawulo lwe-SPAM, ulawulo lwezimvo.
  3. Umthetho: Imvume yakho
  4. Unxibelelwano lwedatha: Idatha ayizukuhanjiswa kubantu besithathu ngaphandle koxanduva lomthetho.
  5. Ukugcinwa kweenkcukacha
  6. Amalungelo: Ngalo naliphi na ixesha unganciphisa, uphinde uphinde ucime ulwazi lwakho.