I am using a virtual gps to send NMEA data to arduino form one of my serial port of computer to arduino mega serial1 port and try to read watever is send... but not getting the desired output in the serial monitor.. here is my code..
long lat,lon;// variables to store latitude n longitude
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop()
{
while(Serial1.available())//check for gps data
{
char val=Serial1.read();
Serial.print(val);
}
}
i have set baud rate of 9600 on both virtual gps and in serial monitor...
Data sent by virtual gps
$GPGGA,000000.000,0000.000000,N,00000.000000,E,1,0,0,0,M,0,M,,*42
Data received in serial monitor
[}ÅÅõ�ŸŸŸŸŸŸ£ŸŸŸ§ŸŸŸŸ£ŸŸŸŸŸŸ§c§ŸŸŸŸŸ£ŸŸŸŸŸŸ§u§�§Ÿ§Ÿ§Ÿ§e§Ÿ§e§§«—›åë
please help...
Thanx in advance..