Hello everyone
I am using neo 6m GPS with the Arduino Mega 2560.
My connections are:
Ard-->GPS
3.3v-->Vcc
GND-->GND
pin 0 (RX) --> TX
pin 1 (TX) --> RX
my code is #include <SoftwareSerial.h>
SoftwareSerial ss(1, 0);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
ss.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.pri
while (ss.available()){
// get the byte data from the GPS
Serial.write(ss.read());
}
}
I removed the RX TX connections before uploading the code and again connected
But there no output in the serial monitor. Not even a single character.
I have 3 gps modules and its the same for all of them. I waited for 1 hour for each gps module but there was no progress. NO GPS module LED blinking. and no RX TX LED on Arduino blinking.
Could you please guide me??
You are useing SoftwareSerial, but you have connected your GPS to the hardware Serial
pins on your Mega. These pins are used by the normal Serial.print.
Your loop() has a problem with the Serial.pri ????
Try to use other pins and try to use TinyGPS++.h with a lot of esamples
/ffur
Your topic was MOVED to its current forum category which is more appropriate than the original as it has nothing to do with Installation and Troubleshooting of the IDE
Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'
Use [color = red]code tags[/color] (the </> icon above the compose window) to make it easier to read and copy for examination
Thank you John for suggestion but on my arduino mega
19 18 are RX1 TX1,
17 16 are RX2 TX2,
15 14 are RX3 TX3,
so I connected RX and TX of GPS module to TX1 and RX1 respectively. Then I got the readings on serial monitor.
and I just used Serial1 instead of ss of Software Serial.