Hi, i m having some hard time trying to use the [GPS SparkFun Venus GPS with SMA Connector.
I m only able to receive gps data using the hardware UART of a Mega2560, if i try with software serial on the same Mega2560 or on a pro micro 3.3v, i receive no data
here the code i use as test
#include <SoftwareSerial.h>
SoftwareSerial GPS(5,6); // 5 is RX, TX is not used
void setup()
{
Serial.begin(9600);
Serial1.begin(9600);
//GPS.begin(9600);
}
void loop()
{
//if(GPS.available()) Serial.write(GPS.read());
if(Serial1.available()) Serial.write(Serial1.read());
}
any idea is welcome](https://www.sparkfun.com/products/11058)
i managed to received data using software serial on the mega2560 by using a pin linked to an interrupt :D.
Unfortunately i m not able to do the same on the pro micro 3.3v, i tried on the pin 2,3,7 which are linked to interrupts 1,0,4.
i tried to attach an interrupt to the pin receiving the gps data (pin3, interrupt 0), and it worked.
The state of the input is well changing, but still no data received.
i also tried to loop hardware and softwareSerial as follow:
connecting pin 3 (software rx) to the pin 1 (hardware tx0),
#include <SoftwareSerial.h>
SoftwareSerial GPS(3,2); //RX,TX
void setup()
{
Serial.begin(9600);
GPS.begin(9600);
}
void loop()
{
if(GPS.available()) Serial.write(GPS.read());
if(Serial.available()) Serial.write(Serial.read());
}
void debug(){ Serial.println(micros()); }
i expected to receive a sent char again and again, but i only get it once
I donβt understand why the softwareSerial lib does not provide any data.