Hi everyone,
In my project I am using GPS module which is based on ublox NEO M8N. Module has RX Tx pin and a USB port also. It is working correctly via USB cable but isn't working with serial communication.
I uploaded empty sketch to my Arduino and connect GPS module to normal RX TX pins. But in my serial monitor couldn't process NMEA correctly. My output is showing as follows,
au⸮@⸮⸮8⸮2#p=⸮@
<⸮⸮9A⸮
9⸮2⸮⸮⸮⸮⸮i
I have changed baud rate and tried but it is giving same result. It is totally find through USB and showing NMEA in serial monitor but it cant connecting to Arduino form USB port. So I need your help to find the solution.
Thank You.
You will need to run a sketch that reads the serial input and if data is available, prints it to the Serial monitor
Pins 0 and 1 are not a good choice on the Nano because they are used by the hardware Serial interface with the Serial monitor and for uploading code
Consider using SoftwareSerial on 2 other pins of your choice
#include "SoftwareSerial.h"
SoftwareSerial gpsSerial(2, 3); //Rx, Tx, but you choose
void setup()
{
Serial.begin(115200); //must match the Serial monitor
gpsSerial.begin(9600); //change if required
}
void loop()
{
if (gpsSerial.available())
{
Serial.write(gpsSerial.read());
}
}
@UKHeliBob Thanks for your support and I am really appreciate that.
Yes. everything is the same as you mentioned. But same result is happening.
I am using module which was ordered from this web site. https://tronic.lk/product/ublox-neo-8m-gps-module
Thank You.
@UKHeliBob I found the problem and solved it. Anyway I am really appreciate your support.
M8N module is programmable and you can configure it through u-blox u-center. In u-center you can control ports as what are the ports, baud rates and what are the output formats as well (See UBX-CFG-PRT). Then you can select output port and other parameters as well. If anyone is facing same problem above mentioned, try this way and this may be your solution..
Thank You.