GPS

image link: https://drive.google.com/open?id=0B3Pv41siOVyaVU1VNUFYUHJSYWc

I am using GPS NEO6MV2 in my project but on serial monitor am getting error as shown in image.

and the code I am using is also shown in he image

Code:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(0, 1); // RX, TX

void setup() {
Serial.begin(9600);
mySerial.begin(9600);
}

void loop() {
bool ready = false;
if (mySerial.available()) {
Serial.write(mySerial.read());
delay(10);
}
}

Why are you using SoftwareSerial on the hardware Serial pins?

Pieter

Please read [How To Use This Forum](http://How To Use This Forum). Then modify your post to use [code][/code] tags around your code...

 ... so it looks like this

You didn't describe the wiring, or which Arduino you are using.

You could damage the GPS device with a direct connection, because the Arduino uses 5V signals and the GPS device uses 3.3V levels. This post describes a few ways to do "level-shifting".

If you really hooked the GPS TX to pin 0 and GPS RX to pin 1 (the pins for Serial), this is the echo test or "pass-through sketch":

void setup()  {
    Serial.begin(9600);
}

void loop() {
  if (Serial.available()) {
   Serial.write(Serial.read());
  }
}

Don't use delay.

You will have to disconnect the GPS TX (or level-shifting component) from pin 0 to upload new sketches. When you see NMEA data ($GPRMC etc.) in the Serial Monitor window, you will know the GPS is connected correctly, and that you have the right baud rate.

You could also connect the GPS to Arduino pins 8 and 9 to use AltSoftSerial.

You might be interested in my NeoGPS library. It's smaller, faster and more accurate than all other libraries. If you want to try it, it is also available from the Arduino IDE Library Manager, under the menu Sketch -> Include Library -> Manage Libraries. Be sure to read the Troubleshooting page.

Apart from using software serial on the hardware serial port, which is odd enough, you have also setup hardware serial, giving you two serial ports on the same pins.

Two serial ports on the same pins is not going to work well.