{"id":61810,"date":"2025-06-10T15:27:38","date_gmt":"2025-06-10T19:27:38","guid":{"rendered":"https:\/\/www.engineersgarage.com\/?p=61810"},"modified":"2025-06-11T12:18:30","modified_gmt":"2025-06-11T16:18:30","slug":"articles-raspberry-pi-neo-6m-gps-module-interfacing","status":"publish","type":"post","link":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/","title":{"rendered":"RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi"},"content":{"rendered":"<p class=\"ai-optimize-6 ai-optimize-introduction\"><span data-preserver-spaces=\"true\">In the <a href=\"https:\/\/www.engineersgarage.com\/microcontroller-projects\/articles-raspberry-pi-sim900a-gsm-gprs-modem-voice-call-sms\/\"><strong>previous tutorial<\/strong><\/a>, we learned how to interface a SIM900 GSM-GPRS modem with Raspberry Pi (RPi) and a desktop computer. We employed\u00a0<\/span><strong><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/www.engineersgarage.com\/raspberrypi\/articles-raspberry-pi-serial-communication-uart-protocol-ttl-port-usb-serial-boards\/\" target=\"_blank\" rel=\"noopener noreferrer\">serial UART communication<\/a><\/strong><span data-preserver-spaces=\"true\">\u00a0to \u201ctalk\u201d with the SIM900 modem. By using bidirectional data communication with the modem via a standard\u00a0<\/span><strong><a class=\"_e75a791d-denali-editor-page-rtfLink\" href=\"https:\/\/www.engineersgarage.com\/raspberrypi\/raspberry-pi-serial-communication-uart-protocol-ttl-port-usb-serial-boards\/\" target=\"_blank\" rel=\"noopener noreferrer\">UART interface<\/a><\/strong><span data-preserver-spaces=\"true\">, we were able to make\/receive calls and send\/receive SMS messages on RPi and a desktop computer.<\/span><\/p>\n<p class=\"ai-optimize-7\"><span data-preserver-spaces=\"true\">By using the same UART interface and protocol in this tutorial, we\u2019ll interface a global positioning system (GSP) module with RPi.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-8\"><span data-preserver-spaces=\"true\"><a href=\"https:\/\/www.engineersgarage.com\/featured\/gps-basics-ublox-skytraq-sirf\/\" target=\"_blank\" rel=\"noopener noreferrer\">We use the GPS module, NEO-6MV2. This is a low-cost<\/a> GPS receiver that\u2019s commonly used in embedded devices and robotic projects (there are others from several different vendors). A GPS receiver gives its location by linking to available GPS satellites.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-9\"><span data-preserver-spaces=\"true\">A GPS receiver can be used to track a location. For example, by interfacing a GPS receiver (like NEO-6) and a GSM modem (like SIM900) to a controller or embedded computer, we can design a vehicle tracking system. In this system, the GPS receiver gets the current location of the vehicle and the GSM-GPRS modem communicates that location to a remote server via a mobile network.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-10\"><span data-preserver-spaces=\"true\">Similarly, we can use a GPS receiver in a drone to keep track of its location and manage a GPS-guided flight. The same GPS receivers are used in smartphones, tablets, and GPS navigation systems.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-11\"><span data-preserver-spaces=\"true\">Now, let\u2019s learn how to interface a GPS receiver with an embedded computer such as Raspberry Pi.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-12\"><strong><span data-preserver-spaces=\"true\">The NEO-6MV2 GPS module<\/span><\/strong><span data-preserver-spaces=\"true\"><br \/>\n<\/span><span data-preserver-spaces=\"true\">The NEO-6MV2 is a standalone GPS receiver that\u2019s used for navigation. The GPS receiver links with GPS satellites to get its own location. It, then, outputs the latitude and longitude of its position as serial data.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-13\"><span data-preserver-spaces=\"true\">The NEO-6 module is based on a 50-channel, ublox-6 positioning engine that boasts a time-to-first-fix (TTFF) of one second. This GPS engine has two million correlators and is capable of massive parallel time\/frequency space searches. This enables it to find satellites instantly. The module also has a small form-factor that makes it ideal for battery-operated mobile devices.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-14\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-01-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-61811 aligncenter\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-01-300x225.jpg\" alt=\"\" width=\"715\" height=\"536\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-01-300x225.jpg 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-01-1024x768.jpg 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-01-768x576.jpg 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-01-1536x1152.jpg 1536w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-01-2048x1536.jpg 2048w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-01-317x238.jpg 317w\" sizes=\"auto, (max-width: 715px) 100vw, 715px\" \/><\/a><\/p>\n<p class=\"ai-optimize-15\">The NEO-6M GPS modem operates on a supply voltage of 2.7 to 3.6V. It communicates GPS data according to the NMEA or UBX protocol. While NMEA is a standard ASCII protocol, UBX is a u-blox proprietary binary protocol.<\/p>\n<p class=\"ai-optimize-16\">The receiver chipset has UART, USB, SPI, and DDC (I2C-compliant) interfaces to communicate this data. The chipset has three configuration pins. One of these configuration pins \u2014 CFG-GPS0 \u2014 is used to enable boot configuration of the power mode.<\/p>\n<p class=\"ai-optimize-17\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-02.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61812\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-02-300x29.png\" alt=\"\" width=\"755\" height=\"73\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-02-300x29.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-02-768x75.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-02-368x36.png 368w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-02.png 840w\" sizes=\"auto, (max-width: 755px) 100vw, 755px\" \/><\/a><\/p>\n<p class=\"ai-optimize-18\">The other two configuration pins \u2014 CFG_COM0 and CFG_COM1 \u2014 are used to decide whether GPS data is communicated by using the NMEA protocol or UBX protocol.<\/p>\n<p class=\"ai-optimize-19\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-03.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61813\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-03-300x48.png\" alt=\"\" width=\"758\" height=\"121\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-03-300x48.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-03-768x123.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-03-368x59.png 368w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-03.png 845w\" sizes=\"auto, (max-width: 758px) 100vw, 758px\" \/><\/a><\/p>\n<p class=\"ai-optimize-20\">The NEO-6 modem has this pin assignment:<\/p>\n<p class=\"ai-optimize-21\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-04.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61814\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-04-300x160.png\" alt=\"\" width=\"715\" height=\"381\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-04-300x160.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-04-1024x547.png 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-04-768x410.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-04-368x196.png 368w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-04.png 1201w\" sizes=\"auto, (max-width: 715px) 100vw, 715px\" \/><\/a><\/p>\n<p class=\"ai-optimize-22\">In the module used here, the NEO-6 modem is pre-configured to output data using the serial (UART) interface and encode GPS data to the NMEA protocol.<\/p>\n<p class=\"ai-optimize-23\">The configuration pins CFG_COM0 and CFG_COM1 are pulled to HIGH and, as a result, the GPS data is communicated over the NMEA protocol at a baud rate of 9600 bps. As you can see from the above table, with this configuration, the NMEA data includes GSV, RMC, GSA, GGA, GLL, and VTG messages.<\/p>\n<p class=\"ai-optimize-24\">The module only exposes four channels as shown in this pin diagram:<\/p>\n<p class=\"ai-optimize-25\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-05.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61815\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-05-300x145.png\" alt=\"\" width=\"714\" height=\"345\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-05-300x145.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-05-368x177.png 368w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-05.png 600w\" sizes=\"auto, (max-width: 714px) 100vw, 714px\" \/><\/a>The module has the following pin assignment:<\/p>\n<p class=\"ai-optimize-26\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.16.48-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61816\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.16.48-PM-300x75.png\" alt=\"\" width=\"700\" height=\"175\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.16.48-PM-300x75.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.16.48-PM-368x92.png 368w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.16.48-PM.png 682w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<p class=\"ai-optimize-27\"><span data-preserver-spaces=\"true\">The maximum navigation update rate of the module is 5 Hz. So, a controller or embedded computer can read the GPS data from the modem in a minimum of 0.2 seconds.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-28\"><span data-preserver-spaces=\"true\">When the modem is powered on, it takes 32 seconds for a cold start, 23 seconds for a warm start, or one second for a hot start. Since the module is configured for a cold start, it initially takes 32 seconds to get the GPS reading for the first time.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-29\"><span data-preserver-spaces=\"true\">The module also comes with an external antenna that has a sensitivity of -160dBm. The module has an onboard EEPROM and RTC with battery backup. The NEO-6M modem can operate in temperatures between -40\u02da to 85\u02da C.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-30\"><strong><span data-preserver-spaces=\"true\">Interfacing the NEO-6MV2 GPS module<\/span><\/strong><span data-preserver-spaces=\"true\"><br \/>\n<\/span>The module has all of the hardware connections onboard with the NEO-6M modem, which is already pre-configured. According to the hardware configuration, the module only exposes four channels of the modem:<\/p>\n<p class=\"ai-optimize-31\"><strong>1.<\/strong> The VCC (pin 23 of the modem)<br \/>\n<strong>2.<\/strong> The UART receiver (pin 21 of the modem)<br \/>\n<strong>3.<\/strong> The UART transmitter (pin 20 of the modem)<br \/>\n<strong>4.<\/strong> The ground (which can be pin 10, 12, 13, or 24 of the modem)<\/p>\n<p class=\"ai-optimize-32\">The NEO-6MV2 GPS module can easily interface with the serial TTL port of a controller\/computer. However, the VCC pin must be supplied with a maximum of 3.6V DC voltage and the ground pin must be connected to a common ground. The TX pin of the module should be connected to the Rxd of the serial TTL port of the controller\/computer.<\/p>\n<p class=\"ai-optimize-33\">To connect the module with desktop computers, the USB-serial board can be used. Remember that the GPS module has an operating voltage maximum of 3.6V. Therefore, when interfaced with a controller (such as Arduino) or an embedded computer (such as RPi), the modem should be supplied with the VCC from a 3V3 power output pin.<\/p>\n<p class=\"ai-optimize-34\">When interfaced to desktop computers via a USB-serial board, this board must first be configured to use the 3V3 TTL voltage levels by placing the jumper to the 3.3V header.<\/p>\n<p class=\"ai-optimize-35\"><strong><span data-preserver-spaces=\"true\">NMEA protocol<\/span><\/strong><span data-preserver-spaces=\"true\"><br \/>\n<\/span><span data-preserver-spaces=\"true\">NMEA is an acronym for the National Marine Electronics Association. In context to a GPS, NMEA is a standard data format supported by all GPS manufacturers. It\u2019s a protocol for GPS data that is used by the GPS receivers and associated software.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-36\"><span data-preserver-spaces=\"true\">NMEA-formatted GPS data can be transmitted over a variety of data communication standards, including UART, SPI, I2C, USB, Wi-Fi, UHF, and Bluetooth.\u00a0\u00a0<\/span><\/p>\n<p class=\"ai-optimize-37\"><span data-preserver-spaces=\"true\">In NMEA protocol, the GPS data is communicated as NMEA message strings. There are also GPS receivers with different capabilities. According to their capabilities, they typically communicate a subset of NMEA message strings. All NMEA messages start with the $ character, followed by the message ID and various data fields that are separated by a comma. The message ends with an asterisk (*), followed by checksum character. Lastly, a carriage return and line feed serve as the end characters.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-38\"><span data-preserver-spaces=\"true\">The GPS module used here communicates GSV, RMC, GSA, GGA, GLL, and, VTG NMEA messages. Let\u2019s examine the NMEA message strings one by one.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-39\"><strong><span data-preserver-spaces=\"true\">GPRMC \u2013 <\/span><\/strong><span data-preserver-spaces=\"true\">indicates the position, velocity, and time. It has this format:<\/span><\/p>\n<p class=\"ai-optimize-40\"><span style=\"color: #993300;\"><strong>$GPRMC,hhmmss:ss,Status,Latitude,N,Longitude,E,SOG,COG,ddmmyy,MV,MVE,Mode*CS&lt;CR&gt;&lt;LF&gt;<\/strong><\/span><\/p>\n<p class=\"ai-optimize-41\"><span data-preserver-spaces=\"true\">The data fields of the GPRMC NMEA message are described in this table:<\/span><\/p>\n<p class=\"ai-optimize-42\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.31.36-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61821\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.31.36-PM-300x201.png\" alt=\"\" width=\"705\" height=\"472\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.31.36-PM-300x201.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.31.36-PM-768x514.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.31.36-PM-355x238.png 355w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.31.36-PM.png 899w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<p class=\"ai-optimize-43\"><strong>GPVTG \u2013<\/strong> indicates the track made good and speed over ground. It has this format:<\/p>\n<p class=\"ai-optimize-44\"><span style=\"color: #993300;\"><strong>$GPVTG,cogt,T,cogm,M,sog,N,kph,K,mode*cs&lt;CR&gt;&lt;LF&gt;<\/strong><\/span><\/p>\n<p class=\"ai-optimize-45\">The data fields of the GPVTG NMEA message are described in this table:<\/p>\n<p class=\"ai-optimize-46\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.34.37-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61823\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.34.37-PM-300x182.png\" alt=\"\" width=\"705\" height=\"428\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.34.37-PM-300x182.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.34.37-PM-768x467.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.34.37-PM-368x224.png 368w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.34.37-PM.png 897w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<p class=\"ai-optimize-47\"><strong>GPGGA<\/strong> <strong>\u2013<\/strong> indicates the time, position, and fix related data. It has this format:<\/p>\n<p class=\"ai-optimize-48\"><span style=\"color: #993300;\"><strong>$GPGGA,hhmmss:ss,Latitude,N,Longitude,E,FS,NoSV,HDOP,msl,m,Altref,m,DiffAge,DiffStation*cs&lt;CR&gt;&lt;LF&gt;<\/strong><\/span><\/p>\n<p class=\"ai-optimize-49\">The data fields of the GPGGA NMEA message are described in this table:<\/p>\n<p class=\"ai-optimize-50\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.36.37-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61825\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.36.37-PM-300x209.png\" alt=\"\" width=\"705\" height=\"491\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.36.37-PM-300x209.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.36.37-PM-768x534.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.36.37-PM-342x238.png 342w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.36.37-PM.png 899w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<p class=\"ai-optimize-51\"><strong>GPGSA<\/strong> <strong>\u2013 <\/strong>indicates the GPS DOP and active satellites. It has this format:<\/p>\n<p class=\"ai-optimize-52\"><strong><span style=\"color: #993300;\">$GPGSA,Smode,FS{,sv},PDOP,HDOP,VDOP*cs&lt;CR&gt;&lt;LF&gt;<\/span><\/strong><\/p>\n<p class=\"ai-optimize-53\">The data fields of the GPGSA NMEA message are described in this table:<\/p>\n<p class=\"ai-optimize-54\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.38.03-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61826\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.38.03-PM-300x129.png\" alt=\"\" width=\"705\" height=\"303\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.38.03-PM-300x129.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.38.03-PM-768x329.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.38.03-PM-368x158.png 368w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.38.03-PM.png 896w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/a><\/p>\n<p class=\"ai-optimize-55\"><strong>GPGSV<\/strong> <strong>\u2013 <\/strong>indicates the number of SVs in view, the PRN numbers, elevations, azimuths, and the SNR values. It has this format:<\/p>\n<p class=\"ai-optimize-56\"><strong><span style=\"color: #993300;\">$GPGSV,NoMessages,MessageNumber,NoSV,PRN,Elevation,Azimuth,SNR,<br \/>\n&lt;Information about second SV in same format&gt;,<\/span><\/strong><br \/>\n<span style=\"color: #993300;\"><strong>&lt;Information about third SV in same format&gt;,<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>&lt;Information about fourth SV in same format&gt;,*cs&lt;CR&gt;&lt;LF&gt;<\/strong><\/span><\/p>\n<p class=\"ai-optimize-57\">The data fields of the GPGSV NMEA message are described in this table:<\/p>\n<p class=\"ai-optimize-58\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.40.33-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61827\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.40.33-PM-300x164.png\" alt=\"\" width=\"704\" height=\"385\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.40.33-PM-300x164.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.40.33-PM-768x421.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.40.33-PM-368x202.png 368w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.40.33-PM.png 898w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><\/a><\/p>\n<p class=\"ai-optimize-59\"><strong>GPGLL<\/strong> <strong>\u2013 <\/strong>indicates the position data, such as the position fix, time of the position fix, and its status. It has this format:<\/p>\n<p class=\"ai-optimize-60\"><strong><span style=\"color: #993300;\">$GPGLL,Latitude,DirLat,Longitude,DirLongitude,hhmmss:ss,A,cs&lt;CR&gt;&lt;LF&gt;<\/span><\/strong><\/p>\n<p class=\"ai-optimize-61\">The data fields of the GPGLL NMEA message are described in this table:<\/p>\n<p class=\"ai-optimize-62\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.42.22-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61828\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.42.22-PM-300x110.png\" alt=\"\" width=\"704\" height=\"258\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.42.22-PM-300x110.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.42.22-PM-768x283.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.42.22-PM-368x135.png 368w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Screen-Shot-2020-08-14-at-1.42.22-PM.png 899w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><\/a><\/p>\n<p class=\"ai-optimize-63\"><strong>Interfacing the NEO-6MV2 GPS with RPi<\/strong><br \/>\nTo interface the NEO-6MV2 GPS module with Raspberry Pi, supply the module VCC from RPi\u2019s 3.3V pin (board pin 1 or 17) and then ground from any of the ground pins on RPi (board pin 6, 9, 14, 20, 25, 30, 34, or 39).<\/p>\n<p class=\"ai-optimize-64\">Next, connect the TX of the module with the <a href=\"https:\/\/www.engineersgarage.com\/microcontroller-projects\/articles-raspberry-pi-serial-communication-uart-protocol-serial-linux-devices\/\">UART Rxd of the Raspberry Pi<\/a> (board pin 10). It\u2019s unnecessary to send any of the serial data to the NEO-6 modem, which means there\u2019s no need to connect with the RX of the module.<\/p>\n<p class=\"ai-optimize-65\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-06.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61829\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-06-300x219.png\" alt=\"\" width=\"701\" height=\"512\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-06-300x219.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-06-1024x746.png 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-06-768x560.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-06-327x238.png 327w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-06.png 1304w\" sizes=\"auto, (max-width: 701px) 100vw, 701px\" \/><\/a><\/p>\n<p class=\"ai-optimize-66\"><strong><span data-preserver-spaces=\"true\">Checking if the NEO-6MV2 GPS module is working<\/span><\/strong><span data-preserver-spaces=\"true\"><br \/>\n<\/span><span data-preserver-spaces=\"true\">When the GPS module is supplied power, it initially takes some time to get ready. This will depend on the configuration of the module whether it\u2019s configured for a cold, warm, or hot start.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-67\"><span data-preserver-spaces=\"true\">After waking up, if the GPS satellites are visible to the receiver and it begins to attain its location, a status LED on the module will start blinking.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-68\"><span data-preserver-spaces=\"true\">If this LED fails to blink, either the module is not working properly or the satellite is unclear. In this case, you can try to get raw GPS data from the module. If you\u2019re able to attain at least some information (such as the UTC time) but unable to get the location data, this means that the module is fine but that there isn\u2019t a satellite visible to the GPS receiver.\u00a0<\/span><\/p>\n<p class=\"ai-optimize-69\"><span data-preserver-spaces=\"true\">Wait for some time (say, a few minutes or a half-hour) and try getting raw GPS data again. If the module is working properly, it may attain the location data after some time.\u00a0<\/span><\/p>\n<p><span style=\"color: #0000ff;\"><strong><br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/drive.google.com\/file\/d\/1WFkwzNJwo-rrh-yWzOHmUYSQqaMWYlZC\/preview\" width=\"640\" height=\"480\"><\/iframe><\/strong><\/span><\/p>\n<p class=\"ai-optimize-70\"><strong>Getting raw data from the NEO-6MV2 GPS using Python<\/strong><br \/>\nThe raw GPS data can be read from the NEO-6M GPS module using the <strong><a style=\"background-color: #ffffff;\" href=\"https:\/\/www.engineersgarage.com\/raspberrypi\/articles-raspberry-pi-serial-communication-uart-protocol-ttl-port-usb-serial-boards\/\">serial.read()<\/a> <\/strong>or serial.readline() methods of <strong><a style=\"background-color: #ffffff;\" href=\"https:\/\/www.engineersgarage.com\/raspberrypi\/rpi-python-programming-06-python-basics\/\">Python<\/a><\/strong>.<\/p>\n<p class=\"ai-optimize-71\">Here\u2019s how:<\/p>\n<ul>\n<li class=\"ai-optimize-72\">Import the serial, time, and sys libraries.<\/li>\n<li class=\"ai-optimize-73\">Open serial the TTL port where the GPS module is interfaced using the serial.Serial() method.<\/li>\n<li class=\"ai-optimize-74\">This port name will be \/dev\/serial0. Alternatively, \/dev\/ttyAMA0 or \/dev\/ttyS0 can be used as a port name, depending on the primary UART on the <a href=\"https:\/\/www.engineersgarage.com\/raspberrypi\/articles-raspberry-pi-models-2019\/\">respective Raspberry Pi model<\/a>.<\/li>\n<li class=\"ai-optimize-75\">Read the serial data from the GPS module line-by-line by using the serial.readline() method. Or, use the specific number of characters of the serial data from the GPS module using the serial.read() method.<\/li>\n<li class=\"ai-optimize-76\">Continue reading the data until the NMEA message strings starts repeating.<\/li>\n<\/ul>\n<p class=\"ai-optimize-77\">Here\u2019s an example of a Python script that reads the raw GPS data from the NEO-6M GPS module:<\/p>\n<p class=\"ai-optimize-78\"><span style=\"color: #993300;\"><strong>import serial\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>from time import sleep<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>import sys<\/strong><\/span><\/p>\n<p class=\"ai-optimize-79\"><span style=\"color: #993300;\"><strong>ser = serial.Serial (&#8220;\/dev\/ttyS0&#8221;)<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>try:<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0 while True:<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 received_data = (str)(ser.readline()) #read NMEA string received<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print(received_data, &#8220;\\n&#8221;)<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>except KeyboardInterrupt:<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0 sys.exit(0)\u00a0\u00a0<\/strong><\/span><\/p>\n<p class=\"ai-optimize-80\">When running the above script in Raspberry Pi, we received the following GPS data in the IDLE&#8217;s console:<\/p>\n<p class=\"ai-optimize-81\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-07.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61830\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-07-300x288.png\" alt=\"\" width=\"715\" height=\"686\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-07-300x288.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-07-1024x984.png 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-07-768x738.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-07-248x238.png 248w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-07.png 1048w\" sizes=\"auto, (max-width: 715px) 100vw, 715px\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\"><strong><br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/drive.google.com\/file\/d\/1_2FmuCpHW6GZGCHoyGN1FhUkR1xb2AHJ\/preview\" width=\"640\" height=\"480\"><\/iframe><\/strong><\/span><\/p>\n<p class=\"ai-optimize-82\"><strong>Getting the GPS position from the NEO-6MV2 GPS using Python<\/strong><br \/>\nThe raw GPS data contains RMS, VTG, GGA, GSA, GSV, and the GLL NMEA message strings. There are a total of nine message strings of raw GPS data at a time.<\/p>\n<p class=\"ai-optimize-83\">To get the GPS location, we can extract the $GPGGA or $GPGLL message strings. Both of these strings contain the location information. Here, we have extracted the GPS location from the $GPGGA message string.<\/p>\n<p class=\"ai-optimize-84\">The raw GPS data can be stored in a string type variable. By using the string manipulation functions, such as find(), we can search for the $GPGGA or $GPGLL in the received string.<\/p>\n<p class=\"ai-optimize-85\">If the received GPS data contains one of these strings, split the message string after the $GPGGA or $GPGLL by using the split() function. Next, split the received NMEA message data fields to an array by using the comma as a delimiter in the split() function.<\/p>\n<p class=\"ai-optimize-86\">Now, you have the data fields of $GPGGA or the $GPGLL NMEA message string in an array. You can extract the UTC time, latitude, and longitude by accessing a different index of the resultant array. The latitude and longitude can be converted to degrees by using the simple mathematical and formatting operations on the received values. The converted values of latitude and longitude can also be printed on the console or transferred to a variable.<\/p>\n<p class=\"ai-optimize-87\">The following is an example of a Python script that extracts the GPS location from raw GPS data of the NEO-6M GPS module:<\/p>\n<p class=\"ai-optimize-88\"><span style=\"color: #993300;\"><strong>import serial\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>from time import sleep<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>import sys<\/strong><\/span><\/p>\n<p class=\"ai-optimize-89\"><span style=\"color: #993300;\"><strong>ser = serial.Serial (&#8220;\/dev\/ttyS0&#8221;)<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>gpgga_info = &#8220;$GPGGA,&#8221;<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>GPGGA_buffer = 0<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>NMEA_buff = 0<\/strong><\/span><\/p>\n<p class=\"ai-optimize-90\"><span style=\"color: #993300;\"><strong>def convert_to_degrees(raw_value):<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0 decimal_value = raw_value\/100.00<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0 degrees = int(decimal_value)<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0 mm_mmmm = (decimal_value &#8211; int(decimal_value))\/0.6<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0 position = degrees + mm_mmmm<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0 position = &#8220;%.4f&#8221; %(position)<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0 return position<\/strong><\/span><\/p>\n<p class=\"ai-optimize-91\"><span style=\"color: #993300;\"><strong>try:<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0 while True:<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 received_data = (str)(ser.readline()) #read NMEA string received<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 GPGGA_data_available = received_data.find(gpgga_info)\u00a0\u00a0 #check for NMEA GPGGA string\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (GPGGA_data_available&gt;0):<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 GPGGA_buffer = received_data.split(&#8220;$GPGGA,&#8221;,1)[1]\u00a0 #store data coming after &#8220;$GPGGA,&#8221; string<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NMEA_buff = (GPGGA_buffer.split(&#8216;,&#8217;))<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 nmea_time = []<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 nmea_latitude = []<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 nmea_longitude = []<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 nmea_time = NMEA_buff[0]\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0#extract time from GPGGA string<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 nmea_latitude = NMEA_buff[1]\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 #extract latitude from GPGGA string<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 nmea_longitude = NMEA_buff[3]\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 #extract longitude from GPGGA string<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0print(&#8220;NMEA Time: &#8220;, nmea_time,&#8217;\\n&#8217;)<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 lat = (float)(nmea_latitude)<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 lat = convert_to_degrees(lat)<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 longi = (float)(nmea_longitude)<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 longi = convert_to_degrees(longi)<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print (&#8220;NMEA Latitude:&#8221;, lat,&#8221;NMEA Longitude:&#8221;, longi,&#8217;\\n&#8217;)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/strong><\/span><\/p>\n<p class=\"ai-optimize-92\"><span style=\"color: #993300;\"><strong>except KeyboardInterrupt:<\/strong><\/span><br \/>\n<span style=\"color: #993300;\"><strong>\u00a0\u00a0\u00a0 sys.exit(0)<\/strong><\/span><\/p>\n<p class=\"ai-optimize-93\">When running the above script in RPi, we received the following GPS location in the IDLE&#8217;s console:<\/p>\n<p class=\"ai-optimize-94\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-08.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61831\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-08-300x285.png\" alt=\"\" width=\"715\" height=\"679\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-08-300x285.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-08-1024x974.png 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-08-768x730.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-08-250x238.png 250w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-08.png 1057w\" sizes=\"auto, (max-width: 715px) 100vw, 715px\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\"><strong><br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/drive.google.com\/file\/d\/1OvJ31XNDNtlEVQjCiJPcet1EP2jOj98s\/preview\" width=\"640\" height=\"480\"><\/iframe><\/strong><\/span><\/p>\n<p class=\"ai-optimize-95\"><strong>The GPS position in Google Maps using Python<br \/>\n<\/strong>To show the GPS position in Google Maps, the webbrowser library of Python can be used. You can use the open() method of this library to open a Google Maps link with the latitude and longitude that was obtained in the previous example.<\/p>\n<p class=\"ai-optimize-96\">Here\u2019s an example of a Python script that shows the GPS location of the NEO-6M GPS module in Google Maps:<\/p>\n<p class=\"ai-optimize-97\"><span style=\"color: #800000;\"><strong>import serial\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>from time import sleep<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>import sys<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>import webbrowser<\/strong><\/span><\/p>\n<p class=\"ai-optimize-98\"><span style=\"color: #800000;\"><strong>ser = serial.Serial (&#8220;\/dev\/ttyS0&#8221;)<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>gpgga_info = &#8220;$GPGGA,&#8221;<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>GPGGA_buffer = 0<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>NMEA_buff = 0<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>GPGGA_data_available = &#8220;&#8221;<\/strong><\/span><\/p>\n<p class=\"ai-optimize-99\"><span style=\"color: #800000;\"><strong>def convert_to_degrees(raw_value):<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 decimal_value = raw_value\/100.00<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 degrees = int(decimal_value)<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 mm_mmmm = (decimal_value &#8211; int(decimal_value))\/0.6<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 position = degrees + mm_mmmm<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 position = &#8220;%.4f&#8221; %(position)<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 return position<\/strong><\/span><\/p>\n<p class=\"ai-optimize-100\"><span style=\"color: #800000;\"><strong>received_data = (str)(ser.read(200)) #read NMEA string received<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>GPGGA_data_available = received_data.find(gpgga_info)\u00a0\u00a0 #check for NMEA GPGGA string<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>if (GPGGA_data_available&gt;0):<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 GPGGA_buffer = received_data.split(&#8220;$GPGGA,&#8221;,1)[1]\u00a0 #store data coming after &#8220;$GPGGA,&#8221; string<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 NMEA_buff = (GPGGA_buffer.split(&#8216;,&#8217;))<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 nmea_time = []<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 nmea_latitude = []<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 nmea_longitude = []<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 nmea_time = NMEA_buff[0]\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 #extract time from GPGGA string<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 nmea_latitude = NMEA_buff[1]\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 #extract latitude from GPGGA string<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 nmea_longitude = NMEA_buff[3]<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 print(&#8220;NMEA Time: &#8220;, nmea_time,&#8217;\\n&#8217;)<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 lat = (float)(nmea_latitude)<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 lat = convert_to_degrees(lat)<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 longi = (float)(nmea_longitude)<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 longi = convert_to_degrees(longi)<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 print (&#8220;NMEA Latitude:&#8221;, lat,&#8221;NMEA Longitude:&#8221;, longi,&#8217;\\n&#8217;)<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 map_link = &#8216;http:\/\/maps.google.com\/?q=&#8217; + lat + &#8216;,&#8217; + longi<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>\u00a0\u00a0\u00a0 webbrowser.open(map_link)<\/strong><\/span><br \/>\n<span style=\"color: #800000;\"><strong>sys.exit(0)<\/strong><\/span><\/p>\n<p class=\"ai-optimize-101\">When running the above script in RPi, we received the following GPS location in Google Maps:<\/p>\n<p class=\"ai-optimize-102\"><a href=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-09.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61832\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-09-300x163.png\" alt=\"\" width=\"714\" height=\"388\" srcset=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-09-300x163.png 300w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-09-1024x555.png 1024w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-09-768x416.png 768w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-09-1536x833.png 1536w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-09-368x200.png 368w, https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/23R-09.png 1920w\" sizes=\"auto, (max-width: 714px) 100vw, 714px\" \/><\/a><\/p>\n<p><span style=\"color: #0000ff;\"><strong><br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/drive.google.com\/file\/d\/1qvkPcbWyGmmtZbx8MIAPQn0qyj08I-Tj\/preview\" width=\"640\" height=\"480\"><\/iframe><\/strong><\/span><\/p>\n<p class=\"ai-optimize-103\"><em>In the next tutorial, we we&#8217;ll cover serial communication using I2C in Raspberry Pi.<\/em><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the previous tutorial, we learned how to interface a SIM900 GSM-GPRS modem with Raspberry Pi (RPi) and a desktop computer. We employed\u00a0serial UART communication\u00a0to \u201ctalk\u201d with the SIM900 modem. By using bidirectional data communication with the modem via a standard\u00a0UART interface, we were able to make\/receive calls and send\/receive SMS messages on RPi and&hellip;<\/p>\n","protected":false},"author":387,"featured_media":61833,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[1853,3993],"tags":[1846,1724],"class_list":{"2":"type-post","11":"entry","12":"has-post-thumbnail"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.2 (Yoast SEO v25.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>RPi Python Programming 23: Interfacing NEO-6MV2 GPS module<\/title>\n<meta name=\"description\" content=\"In this tutorial, we\u2019ll interface a global positioning system (GSP) module with RPi by using the UART interface and protocol\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we\u2019ll interface a global positioning system (GSP) module with RPi by using the UART interface and protocol\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/\" \/>\n<meta property=\"og:site_name\" content=\"Engineers Garage\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/engineersgarage\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Rotator-4.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1107\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Nikhil Agnihotri\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EngineersGarage\" \/>\n<meta name=\"twitter:site\" content=\"@EngineersGarage\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nikhil Agnihotri\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/\"},\"author\":{\"name\":\"Nikhil Agnihotri\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/person\/3c71105e3b40a1fd12c79c15602914b6\"},\"headline\":\"RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi\",\"datePublished\":\"2025-06-10T19:27:38+00:00\",\"dateModified\":\"2025-06-11T16:18:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/\"},\"wordCount\":2564,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Rotator-4.jpg\",\"keywords\":[\"python\",\"raspberrypi\"],\"articleSection\":[\"Featured Contributions\",\"Raspberry pi\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/\",\"url\":\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/\",\"name\":\"RPi Python Programming 23: Interfacing NEO-6MV2 GPS module\",\"isPartOf\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Rotator-4.jpg\",\"datePublished\":\"2025-06-10T19:27:38+00:00\",\"dateModified\":\"2025-06-11T16:18:30+00:00\",\"description\":\"In this tutorial, we\u2019ll interface a global positioning system (GSP) module with RPi by using the UART interface and protocol\",\"breadcrumb\":{\"@id\":\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#primaryimage\",\"url\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Rotator-4.jpg\",\"contentUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Rotator-4.jpg\",\"width\":1107,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.engineersgarage.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.engineersgarage.com\/#website\",\"url\":\"https:\/\/www.engineersgarage.com\/\",\"name\":\"Engineers Garage\",\"description\":\"Electronic Projects, Electrical Engineering Resources, Makers Articles and Product News\",\"publisher\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.engineersgarage.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.engineersgarage.com\/#organization\",\"name\":\"Engineer's Garage - WTWH Media\",\"url\":\"https:\/\/www.engineersgarage.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png\",\"contentUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png\",\"width\":372,\"height\":52,\"caption\":\"Engineer's Garage - WTWH Media\"},\"image\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/engineersgarage\",\"https:\/\/x.com\/EngineersGarage\",\"https:\/\/www.youtube.com\/channel\/UC0VITh11JSYk-UW7toLebUw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/person\/3c71105e3b40a1fd12c79c15602914b6\",\"name\":\"Nikhil Agnihotri\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d26b31563fa36169891c8c7d312e9b33de8a0e3da1340ec14ef2de84d5c43497?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d26b31563fa36169891c8c7d312e9b33de8a0e3da1340ec14ef2de84d5c43497?s=96&r=g\",\"caption\":\"Nikhil Agnihotri\"},\"url\":\"https:\/\/www.engineersgarage.com\/author\/nikhil-agnihotri\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"RPi Python Programming 23: Interfacing NEO-6MV2 GPS module","description":"In this tutorial, we\u2019ll interface a global positioning system (GSP) module with RPi by using the UART interface and protocol","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/","og_locale":"en_US","og_type":"article","og_title":"RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi","og_description":"In this tutorial, we\u2019ll interface a global positioning system (GSP) module with RPi by using the UART interface and protocol","og_url":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/","og_site_name":"Engineers Garage","article_publisher":"https:\/\/www.facebook.com\/engineersgarage","og_image":[{"width":1107,"height":600,"url":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Rotator-4.jpg","type":"image\/jpeg"}],"author":"Nikhil Agnihotri","twitter_card":"summary_large_image","twitter_creator":"@EngineersGarage","twitter_site":"@EngineersGarage","twitter_misc":{"Written by":"Nikhil Agnihotri","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#article","isPartOf":{"@id":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/"},"author":{"name":"Nikhil Agnihotri","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/person\/3c71105e3b40a1fd12c79c15602914b6"},"headline":"RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi","datePublished":"2025-06-10T19:27:38+00:00","dateModified":"2025-06-11T16:18:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/"},"wordCount":2564,"commentCount":0,"publisher":{"@id":"https:\/\/www.engineersgarage.com\/#organization"},"image":{"@id":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#primaryimage"},"thumbnailUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Rotator-4.jpg","keywords":["python","raspberrypi"],"articleSection":["Featured Contributions","Raspberry pi"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/","url":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/","name":"RPi Python Programming 23: Interfacing NEO-6MV2 GPS module","isPartOf":{"@id":"https:\/\/www.engineersgarage.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#primaryimage"},"image":{"@id":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#primaryimage"},"thumbnailUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Rotator-4.jpg","datePublished":"2025-06-10T19:27:38+00:00","dateModified":"2025-06-11T16:18:30+00:00","description":"In this tutorial, we\u2019ll interface a global positioning system (GSP) module with RPi by using the UART interface and protocol","breadcrumb":{"@id":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#primaryimage","url":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Rotator-4.jpg","contentUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Rotator-4.jpg","width":1107,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.engineersgarage.com\/articles-raspberry-pi-neo-6m-gps-module-interfacing\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.engineersgarage.com\/"},{"@type":"ListItem","position":2,"name":"RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi"}]},{"@type":"WebSite","@id":"https:\/\/www.engineersgarage.com\/#website","url":"https:\/\/www.engineersgarage.com\/","name":"Engineers Garage","description":"Electronic Projects, Electrical Engineering Resources, Makers Articles and Product News","publisher":{"@id":"https:\/\/www.engineersgarage.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.engineersgarage.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.engineersgarage.com\/#organization","name":"Engineer's Garage - WTWH Media","url":"https:\/\/www.engineersgarage.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png","contentUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png","width":372,"height":52,"caption":"Engineer's Garage - WTWH Media"},"image":{"@id":"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/engineersgarage","https:\/\/x.com\/EngineersGarage","https:\/\/www.youtube.com\/channel\/UC0VITh11JSYk-UW7toLebUw"]},{"@type":"Person","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/person\/3c71105e3b40a1fd12c79c15602914b6","name":"Nikhil Agnihotri","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d26b31563fa36169891c8c7d312e9b33de8a0e3da1340ec14ef2de84d5c43497?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d26b31563fa36169891c8c7d312e9b33de8a0e3da1340ec14ef2de84d5c43497?s=96&r=g","caption":"Nikhil Agnihotri"},"url":"https:\/\/www.engineersgarage.com\/author\/nikhil-agnihotri\/"}]}},"featured_image_src":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Rotator-4.jpg","featured_image_src_square":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2020\/08\/Rotator-4.jpg","author_info":{"display_name":"Nikhil Agnihotri","author_link":"https:\/\/www.engineersgarage.com\/author\/nikhil-agnihotri\/"},"_links":{"self":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/posts\/61810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/users\/387"}],"replies":[{"embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/comments?post=61810"}],"version-history":[{"count":0,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/posts\/61810\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/media\/61833"}],"wp:attachment":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/media?parent=61810"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/categories?post=61810"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/tags?post=61810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}