Hi everyone,
I am doing this post rearding the SparkFun_u-blox_GNSS_Arduino_Library example code “Example12_UseUart.ino”, for reading lat and long via UBX binary commands using UART 38400 baud - free from I2C.
https://github.com/sparkfun/SparkFun_u- … seUart.ino
I currently encounter issues while implementing this code. I’m using the ZED-F9P on a board + Arduino Mega 2560 as CPU, and I can’t establish any connection between devices while using this code / SparkFun_u-blox_GNSS_Arduino_Library.h.
I have been trying to debug this for days but can’t make it work… Would you have any ideas where the issue comes from and how could I fix it ? Have you heard of any similar experiences in the past?
Below some more information:
My wiring:
Arduino 5V → Vin F9P board
Arduino GND → GND F9P board
Arduino IOREF → IOREF F9P board
Arduino RX (PIN 19) → TX F9P board (Serial1)
Arduino TX (PIN 18) → RX F9P board (Serial1)
U-Center configuration:
I did set-up in Message view → CFG → PORTS: Target UART1 / UBX messages as protocol in / UBX NMEA RTCM 3 messages as protocol out / baud rate 38400
Arduino program 1: No issues
While using this basic program I do well receiving NMEA messages and can read them in the Arduino serial monitor so the communication is working.
void setup() {
Serial.begin(9600); // Communication IDE Arduino
Serial1.begin(38400); // Serial1 communication with GNSS module
}
void loop() {
while (Serial1.available()) {
char c = Serial1.read()
Serial.write(c); //Get NMEA messages on IDE
}
delay(3000);
}
Arduino program 2: Issues
Then when I want to implement the Example12_UseUart.ino, with modifications so I use Serial1 with RX pin = 19 and TX pin = 18, the code gets stuck in the synchronization loop to check if it runs well at 38400 baud, so I’m not able to read anything further.
Many thanks for your help!
Lucas