|
8 | 8 | This example shows how to configure the u-blox NEO-F10N GNSS to send NAV SIG reports automatically |
9 | 9 | and access the data via a callback. It also demonstrates how to mark the L5 signals as healthy. |
10 | 10 |
|
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. |
12 | 12 | To run this example on the SparkFun NEO-F10N breakout, you need to open the USB-TX and USB-RX jumpers |
13 | 13 | to isolate the on-board CH340 USB interface chip. See Hardware Connections below. |
14 | 14 |
|
|
30 | 30 | #include <SparkFun_u-blox_GNSS_v3.h> //http://librarymanager/All#SparkFun_u-blox_GNSS_v3 |
31 | 31 | SFE_UBLOX_GNSS_SERIAL myGNSS; |
32 | 32 |
|
| 33 | +#define mySerial Serial2 // Change this to (e.g.) Serial1 if needed |
| 34 | + |
33 | 35 | // Callback: newSIG will be called when new NAV SIG data arrives |
34 | 36 | // See u-blox_structs.h for the full definition of UBX_NAV_SIG_data_t |
35 | 37 | // _____ You can use any name you like for the callback. Use the same name when you call setAutoNAVSIGcallback |
@@ -237,12 +239,12 @@ void setup() |
237 | 239 | Serial.begin(115200); |
238 | 240 | while (!Serial); //Wait for user to open terminal |
239 | 241 | Serial.println("SparkFun u-blox Example"); |
240 | | - |
241 | | - Serial1.begin(38400); // The NEO-F10N defaults to 38400 baud |
| 242 | + |
| 243 | + mySerial.begin(38400); // The NEO-F10N defaults to 38400 baud |
242 | 244 |
|
243 | 245 | //myGNSS.enableDebugging(); // Uncomment this line to enable helpful debug messages on Serial |
244 | 246 |
|
245 | | - 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) |
246 | 248 | { |
247 | 249 | Serial.println(F("u-blox GNSS not detected. Please check wiring. Retrying...")); |
248 | 250 | delay(1000); |
|
0 commit comments