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...
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.
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:
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);
}
}
}