Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Example1_NAV_SIG.ino #51

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions examples/NEO-F10N/Example1_NAV_SIG/Example1_NAV_SIG.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
This example shows how to configure the u-blox NEO-F10N GNSS to send NAV SIG reports automatically
and access the data via a callback. It also demonstrates how to mark the L5 signals as healthy.

Note: the NEO-F10N only supports UART1. It does not support I2C, SPI or built-in USB.
Note: The NEO-F10N only supports UART1. It does not support I2C, SPI or built-in USB.
To run this example on the SparkFun NEO-F10N breakout, you need to open the USB-TX and USB-RX jumpers
to isolate the on-board CH340 USB interface chip. See Hardware Connections below.

Expand All @@ -30,6 +30,8 @@
#include <SparkFun_u-blox_GNSS_v3.h> //http://librarymanager/All#SparkFun_u-blox_GNSS_v3
SFE_UBLOX_GNSS_SERIAL myGNSS;

#define mySerial Serial2 // Change this to (e.g.) Serial1 if needed

// Callback: newSIG will be called when new NAV SIG data arrives
// See u-blox_structs.h for the full definition of UBX_NAV_SIG_data_t
// _____ You can use any name you like for the callback. Use the same name when you call setAutoNAVSIGcallback
Expand Down Expand Up @@ -237,12 +239,12 @@ void setup()
Serial.begin(115200);
while (!Serial); //Wait for user to open terminal
Serial.println("SparkFun u-blox Example");

Serial1.begin(38400); // The NEO-F10N defaults to 38400 baud
mySerial.begin(38400); // The NEO-F10N defaults to 38400 baud

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

while (myGNSS.begin(Serial1) == false) //Connect to the u-blox module using Serial1 (UART)
while (myGNSS.begin(mySerial) == false) //Connect to the u-blox module using mySerial (UART)
{
Serial.println(F("u-blox GNSS not detected. Please check wiring. Retrying..."));
delay(1000);
Expand Down
Loading