Search code examples
carduinogps

Arduino Nano 33 BLE GPS


I want test my new GPS Board (NEO-M9N) with a simple example:

#include <SoftwareSerial.h>
static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 9600;
// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);
void setup()
{
    Serial.begin(115200);
    ss.begin(GPSBaud);
}
void loop()
{
// Output raw GPS data to the serial monitor
    while (ss.available() > 0){
        Serial.write(ss.read());
    }
}

However when I try to run it on my arduino nano 33 ble I got this error:

SoftwareSerial.h: No such file or directory

What do I need to do to run this code with arduino nano 33 ble?


Solution

  • From this forum topic it seems that SoftwareSerial.h does not exist for Arduino Nano 33 BLE Sense boards. But following this Github issue serial communication can be created instead with:

    UART mySerial(digitalPinToPinName(4), digitalPinToPinName(3), NC, NC);
    

    Take a look at this Github issue as well.