Hello,
On a custom circuit board I connected a uBlox GPS module to pins 30 & 31. I'm using the 8 hardware serial ports for something else, so I was planning on using the SoftwareSerial library to get the data from this GPS module. I've verified that the GPS module is working -- when connecting the TX from the module to a hardware RX pin, I get data. When I use the software serial library I get nothing...and yes I've tried swapping pins 30 and 31 in my code below.
On a custom circuit board I connected a uBlox GPS module to pins 30 & 31. I'm using the 8 hardware serial ports for something else, so I was planning on using the SoftwareSerial library to get the data from this GPS module. I've verified that the GPS module is working -- when connecting the TX from the module to a hardware RX pin, I get data. When I use the software serial library I get nothing...and yes I've tried swapping pins 30 and 31 in my code below.
Code:
#include <SoftwareSerial.h>
SoftwareSerial gpsSerial(30, 31); // RX, TX
#define debugSerial Serial
void setup()
{
debugSerial.begin(115200);
gpsSerial.begin(9600);
delay(2000);
}
void loop()
{
if (gpsSerial.available()) {
debugSerial.write(gpsSerial.read());
}
}