OSOYOO Arduino MEGA2560

Example 3 works well with the Arduino UNO by just hooking up pins 3 and 4 which is trivial when you stack it but if I attempt the stack the GPS on the Arduino Mega 2560 I receive no incoming data… Which pins of the Arduino MEGA do I connect to.

What makes pins 3 and 4 so special…

what do I modify in the dGPS.cpp class file?

#define SoftrxPin 3
#define SofttxPin 4

do I modify these pins?

Thankyou!

I solved it… Rather that pins 3 and 4, one must connect pins 10 and 11 respectively.

If you are using the ArduinoMega2560, modify the dGPS.cpp file by replacing

#define SoftrxPin 3
#define SofttxPin 4

with…

#define SoftrxPin 10
#define SofttxPin 11

ins====

Hi mryansoftwareengineering,
Arduino mega only supports the RX channel with software serial on a couple of pins, that’s why it was not working on pins 3 and 4. You can read more about it here: https://www.arduino.cc/en/Reference/SoftwareSerial.

-Karan