Arduino GPS: yenzvimbo uye chinzvimbo

Arduino GPS

With the bhodhi rekuvandudza Arduino inogona kuita huwandu hwemapurojekiti, muganho unowanzo fungidzira. Iine iyo zvigadzirwa zvemagetsi uye ma module, zvinoshanda zvinogona kuwedzerwa kuitira kuti iwe ugone kuita zvimwe zvinhu. Imwe yeanoshanda aya anogona kuve kugona ku tsvaga zvinhu kana vanhu, kana tsvaga nekumira pamwe neArduino GPS.

Rudzi urwu rwe chinzvimbo nekutsvaga zvinogona kuitwa uchishandisa RFID kana vanogamuchira senge iyo yatiri kuzokurukura mune ino chinyorwa. Nezve izvi iwe unozokwanisa kugadzira kuwanda kwemapurojekiti, kubva kumitambo iyo yekugadzira detector nekutsvaga zvinhu, kutsvaga zvinhu zvakabiwa, kugona kuzviwana iwe uchishandisa GPS, nezvimwe.

Arduino NEO-7 GPS Module

Arduino NEO-6 GPS

Kuti uve neArduino GPS, unogona kushandisa iyo NEO-6 zvishandiso, mhuri inogadzirwa naU-Blox uye iyo inogona kuve yakabatana neArduino bhodhi nenzira yakapusa. Uye zvakare, ivo vane yakazara yekutaurirana interface, iine UART, SPI, I2C, uye USB, pamusoro pekutsigira NMEA, UBX binary uye RTCM maprotocol.

Uye zvakare, iyi Arduino GPS ine NEO-6 zvakare inokutendera iwe kudzikisa saizi yeprojekiti yako, nekuti iine saizi diki, pamwe nemutengo wakaderera. Panyaya yekushandisa, zvakare idiki. Kana iri in active mode, zvinongoda 37mA. Inofambiswa ne 2.7 kusvika 3.6V yeiyo NEO-6Q uye NEO-6M modhi, nepo paine mamwe emagetsi epasi anonzi NEO-6G anongoda pakati pe1.75 na2v.

Kana ivo vakasanganiswa mukati module, inosanganisira a voltage mutongi iyo inobvumidza kuti isimbise iyo zvakananga kubva kuArduino 5v kubatana.

Mamwe maparameter anonakidza emu module aya ndeaya:

  • Masekondi makumi matatu e kupisa nguva kutonhora, uye sekondi imwe chete yekutanga kupisa.
  • La yakanyanya kuyerwa frequency vanoshanda pa5Hz chete.
  • Position kunyatso ye2.5 metres yekusiyana.
  • Kurumidza kumhanya 0.1 m / s.
  • Mamiriro ekusiyana ye0.5º chete.

Kwokutenga NEO-6 yeArduino GPS

Unogona kuwana izvi zvishandiso nemamojuru mune akawanda mashopu emagetsi ezvitoro, kana zvakare paAmazon. Semuenzaniso, pano unogona chitenge pamutengo wakachipa kwazvo:

Semuenzaniso naArduino

Screenshot yaArduino IDE

Iwe unogona kudzidza zvakawanda nezve kuronga neArduino neyemahara PDF kosi iwe yaunogona tora kubva apa.

Chinhu chekutanga chaunofanirwa kuita kuti ubatanidze kune rako rekuvandudza bhodhi uye uine yako Arduino GPS ndeyekubatanidza yako NEO-6 module kubhodhi. Iyo kubatana zvakagadzirwa zvakapusa (NEO-6 module yekubatanidza - Arduino kubatana):

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

Paunenge uchinge wakabatana, iwe zvakare uchafanirwa kurodha pasi iyo Raibhurari yeSoftSerial mune yako Arduino IDE, sezvo zvichizodikanwa kune serial kutaurirana. Zvichida kuti unotova nazvo kubva kune mamwe mapurojekiti, asi kana zvisiri, uchafanirwa download uye dzishandise mune yako IDE.

Kana izvo zvapera, iwe unogona kutanga nekodhi yako yakapusa kuti uite izvo kuverenga. Semuenzaniso, sezvo maprotocol akati wandei anogona kushandiswa, heino sketch 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);
   }
}

Ehezve, iwe unogona kugadzira ako ekugadzirisa kana kushandisa mamwe maprotocol kana uchida ... Unogona zvakare kushandisa mienzaniso inowanikwa mune yako IDE yeiri raibhurari. Asi, usati wapedza chinyorwa, iwe unofanirwa kuziva izvo iyo NMEA fomati (National Marine Electronics Asociation) yakanyanyisa, kuti uinzwisise, iwe unofanirwa kuziva syntax yayo:

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

Ndokunge, $ GPRMC inoteverwa nhevedzano ye parameter inoratidza nzvimbo:

  • hmmss.ss: inguva ye UTC mumaawa, maminetsi nemasekondi.
  • Achinzvimbo chekugamuchira, apo A = OK uye V = yambiro.
  • llll.ll, ku: ndiko latitude, uko kunogona kuve N kana S, kuchamhembe kana kumaodzanyemba.
  • yyyy.yy, a: ndiko kureba. Zvakare a anogona kuve E kana W, ndiko kuti, kumabvazuva kana kumadokero.
  • vv: kumhanya mumapfundo.
  • xx: ndiyo kosi mumadhigirii.
  • ddmmyy: izuva re UTC, mumazuva, mwedzi uye gore.
  • mm, a: ndiko kusiyana kwemagineti mumadhigri, uye iyo inogona kuve E kana W yekumabvazuva kana kumadokero.
  • * H H: Checksum kana checksum.

Semuenzaniso, iwe unogona kuwana chimwe chinhu seichi:

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


Izvo zviri muchinyorwa zvinoomerera pamisimboti yedu ye tsika dzekunyora. Kuti utaure chikanganiso tinya pano.

Iva wekutanga kutaura

Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa. Raida minda anozivikanwa ne *

*

*

  1. Inotarisira iyo data: Miguel Ángel Gatón
  2. Chinangwa cheiyo data: Kudzora SPAM, manejimendi manejimendi.
  3. Legitimation: Kubvuma kwako
  4. Kutaurirana kwedata
  5. Dhata yekuchengetedza: Dhatabhesi inobatwa neOccentus Networks (EU)
  6. Kodzero: Panguva ipi neipi iwe unogona kudzora, kupora uye kudzima ruzivo rwako