Nano 33 BLE interface to NEO-6M GPS module

I'm trying to interface the NEO-6M GPS module to the Nano 33 BLE. On the first try, I assumed it would work the same way as with the Arduino Uno - connect the NEO-6M GPS Tx/Rx pins to Arduino digital pins and include <SoftwareSerial.h> in the sketch to assign the digital pins for the UART communication with the GPS. There are many project examples shown for this using the Uno.

It appears <SoftwareSerial.h> doesn't work with the Nano 33 BLE. Does anyone know how to interface the two boards? Is there another version of <SoftwareSerial.h> for the Nano 33 BLE that could be used as a drop-in replacement in the sketch? Connect the GPS Tx/Rx to the dedicated Rx/Tx pins of the Nano 33 BLE? Some other way? I haven't found any project examples showing this interface and a sketch yet...

Thanks!

Unlike the Uno, which shares pins 0 and 1 with the serial port used to communicate with the computer, the Nano 33 BLE has an extra hardware serial port (Serial1) on pins 0 and 1. So you can connect your GPS module to pins 0 and 1 and use Serial1 to communicate with it, no need for software serial.

Thanks - got it... Getting it working now.

You're welcome. I'm glad if I was able to be of assistance. Enjoy!
Per

Hi!

I also have a nano 33 ble and a NEO-6M GY-GPS6MV2 GPS. I want to connect to the Arduino a GSM/GPRS module, so it's not enought for me the Serial1. I want to use pin 4 to TX and pin 5 to RX with this:

UART gpsSerial(digitalPinToPinName(GPS_TX_PIN), digitalPinToPinName(GPS_RX_PIN), NC, NC);

But it doesn't receive data from gpsSerial. The code i wan't to try is:

#include <TinyGPS.h>

#define GPS_RX_PIN 3
#define GPS_TX_PIN 4
long lat, lon; // create variable for latitude and longitude object

UART gpsSerial(digitalPinToPinName(GPS_TX_PIN), digitalPinToPinName(GPS_RX_PIN), NC, NC);
TinyGPS gps; // create gps object

void setup() {
Serial.begin(9600); // connect serial
gpsSerial.begin(9600); // connect gps sensor
pinMode(GPS_RX_PIN, INPUT);
pinMode(GPS_TX_PIN, OUTPUT);
}

void loop() {
while (gpsSerial.available()) { // check for gps data
if (gps.encode(gpsSerial.read())) { // encode gps data
gps.get_position(&lat, &lon); // get latitude and longitude
Serial.print("lat: ");
Serial.print(lat);
Serial.print(" ");
Serial.print("lon: ");
Serial.println(lon);
}
}
}