Skip to content

Commit cb6f794

Browse files
authored
Update Example1_NAV_SIG.ino
Adjust code based on Paul's feedback.
1 parent e9462a1 commit cb6f794

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

examples/NEO-F10N/Example1_NAV_SIG/Example1_NAV_SIG.ino

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
This example shows how to configure the u-blox NEO-F10N GNSS to send NAV SIG reports automatically
99
and access the data via a callback. It also demonstrates how to mark the L5 signals as healthy.
1010
11-
Note: the NEO-F10N only supports UART1. It does not support I2C, SPI or built-in USB.
11+
Note: The NEO-F10N only supports UART1. It does not support I2C, SPI or built-in USB.
1212
To run this example on the SparkFun NEO-F10N breakout, you need to open the USB-TX and USB-RX jumpers
1313
to isolate the on-board CH340 USB interface chip. See Hardware Connections below.
1414
@@ -30,8 +30,7 @@
3030
#include <SparkFun_u-blox_GNSS_v3.h> //http://librarymanager/All#SparkFun_u-blox_GNSS_v3
3131
SFE_UBLOX_GNSS_SERIAL myGNSS;
3232

33-
#define Serial1 Serial2 //Use Serial2 on ESP32-WROOM (RX2 = 16, TX2 = 17), this is easier to access with the IoT RedBoard - ESP32
34-
//Comment out the define if using a different microcontroller
33+
#define mySerial Serial2 // Change this to (e.g.) Serial1 if needed
3534

3635
// Callback: newSIG will be called when new NAV SIG data arrives
3736
// See u-blox_structs.h for the full definition of UBX_NAV_SIG_data_t
@@ -240,13 +239,12 @@ void setup()
240239
Serial.begin(115200);
241240
while (!Serial); //Wait for user to open terminal
242241
Serial.println("SparkFun u-blox Example");
243-
244-
//Serial1.begin(38400); // The NEO-F10N defaults to 38400 baud
245-
Serial1.begin(38400, SERIAL_8N1, 16, 17); //Setup Serial port for ESP32-WROOM (RX2 = 16, TX2 = 17), make sure to Serial1 is defined as Serial2
242+
243+
mySerial.begin(38400); // The NEO-F10N defaults to 38400 baud
246244

247245
//myGNSS.enableDebugging(); // Uncomment this line to enable helpful debug messages on Serial
248246

249-
while (myGNSS.begin(Serial1) == false) //Connect to the u-blox module using Serial1 (UART)
247+
while (myGNSS.begin(mySerial) == false) //Connect to the u-blox module using mySerial (UART)
250248
{
251249
Serial.println(F("u-blox GNSS not detected. Please check wiring. Retrying..."));
252250
delay(1000);

0 commit comments

Comments
 (0)