Arduino Nano 33 低功耗蓝牙 GPS
Arduino Nano 33 BLE GPS
我想用一个简单的例子来测试我的新 GPS 板 (NEO-M9N):
#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());
}
}
然而,当我尝试在我的 arduino nano 33 ble 上 运行 它时,我得到了这个错误:
SoftwareSerial.h: No such file or directory
我需要用 arduino nano 33 ble 对 运行 这段代码做什么?
从 this forum topic it seems that SoftwareSerial.h
does not exist for Arduino Nano 33 BLE Sense boards. But following this Github issue 可以创建串行通信,而不是:
UART mySerial(digitalPinToPinName(4), digitalPinToPinName(3), NC, NC);
我想用一个简单的例子来测试我的新 GPS 板 (NEO-M9N):
#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());
}
}
然而,当我尝试在我的 arduino nano 33 ble 上 运行 它时,我得到了这个错误:
SoftwareSerial.h: No such file or directory
我需要用 arduino nano 33 ble 对 运行 这段代码做什么?
从 this forum topic it seems that SoftwareSerial.h
does not exist for Arduino Nano 33 BLE Sense boards. But following this Github issue 可以创建串行通信,而不是:
UART mySerial(digitalPinToPinName(4), digitalPinToPinName(3), NC, NC);