# TinyGPS++ MKR 1010 and MKR GPS shield?

**URL:** <https://forum.arduino.cc/t/tinygps-mkr-1010-and-mkr-gps-shield/698933>\
**Category:** MKR WiFi 1010\
**Created:** [March 5, 2021, 7:13pm UTC](https://forum.arduino.cc/t/tinygps-mkr-1010-and-mkr-gps-shield/698933 "2021-03-05T19:13:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomstravelemail](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@tomstravelemail](https://forum.arduino.cc/u/tomstravelemail)\
**Post date:** [March 5, 2021, 7:13pm UTC](https://forum.arduino.cc/t/tinygps-mkr-1010-and-mkr-gps-shield/698933/1 "2021-03-05T19:13:56Z")

</div>

I would like to use TinyGPS++ with my MKR1010 and MKR GPS shield. However, SoftwareSerial is disabled for MKR 1010, so I am in over my head on how to tell TinyGPS++ to find the GPS unit. RX on the MKR1010/GPS is pin 13, TX is 14 as a default, and I think it is Serial1. Running the code below compiles but I do not connect to the GPS unit (triggers the “No GPS detected: check wiring”). I assume this is because of the serial communications, since the HW setup works with the MKR GPS example.

```cpp
#include <TinyGPS++.h>
#include "wiring_private.h"
#include <Arduino.h>
// #include <SoftwareSeria.h>
 
/*
   This sample sketch demonstrates the normal use of a TinyGPS++ (TinyGPSPlus) object.
   It requires the use of SoftwareSerial, and assumes that you have a
   4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).
*/
// static const int RXPin = 13, TXPin = 14;
static const uint32_t GPSBaud = 4800;
 
// The TinyGPS++ object
TinyGPSPlus gps;
 
void setup()
{
  Serial.begin(115200);
  Serial1.begin(GPSBaud);
}
 
void loop()
{
  // This sketch displays information every time a new sentence is correctly encoded.
  while (Serial1.available() > 0)
    if (gps.encode(Serial1.read()))
      displayInfo();
 
  if (millis() > 5000 && gps.charsProcessed() < 10)
  {
    Serial.println(F("No GPS detected: check wiring."));
    while(true);
  }
}
 
void displayInfo()
{
  Serial.print(F("Location: ")); 
  if (gps.location.isValid())
  {
    Serial.print(gps.location.lat(), 6);
    Serial.print(F(","));
    Serial.print(gps.location.lng(), 6);
  }
  else
  {
    Serial.print(F("INVALID"));
  }
  Serial.println();
}

```

---

<div class="post-metadata">

**Author:** ![tomstravelemail](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@tomstravelemail](https://forum.arduino.cc/u/tomstravelemail)\
**Post date:** [March 7, 2021, 2:14pm UTC](https://forum.arduino.cc/t/tinygps-mkr-1010-and-mkr-gps-shield/698933/2 "2021-03-07T14:14:02Z")

</div>

Solved! It turns out the MKR GPS Shield is a 9600 baud device, not a 4800 baud device. Just needed to change GPSBaud value.

---

<div class="post-metadata">

**Author:** ![pert](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pert/32/217111_2.png) [@pert](https://forum.arduino.cc/u/pert)\
**Post date:** [March 7, 2021, 4:53pm UTC](https://forum.arduino.cc/t/tinygps-mkr-1010-and-mkr-gps-shield/698933/3 "2021-03-07T16:53:28Z")

</div>

I'm glad to hear it's working now. Thank you for taking the time to post an update. I was interested in the subject but the GPS is one of the few MKR shields I don't own so I was not equiped to properly investigate.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [July 5, 2021, 4:54pm UTC](https://forum.arduino.cc/t/tinygps-mkr-1010-and-mkr-gps-shield/698933/4 "2021-07-05T16:54:17Z")

</div>

Closed on July 5, 2021, 4:54pm UTC

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
