Go Down

Topic: u blox neo-6m and arduino uno problem (Read 1 time) previous topic - next topic

Hello everyone. I'm trying to get data from gps module to my pc.

GPS: u blox neo-6m
Data Sheet:
https://www.google.co.il/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCsQFjAA&url=http%3A%2F%2Fwww.u-blox.com%2Fimages%2Fdownloads%2FProduct_Docs%2FNEO-6_DataSheet_(GPS.G6-HW-09005).pdf&ei=BsUUUvqoKIbm4QT6moGgCQ&usg=AFQjCNFQPsbBHHdHBNAz-EcYSB5T-bkWFA&sig2=72SnC3TA4PbFJTQICJ0zjQ&bvm=bv.50952593,d.bGE



I tried several configurations and connection for example I worked with software serial and I connected to Digits pins.  i also try worked with pins 0,1 for serial information. Also I downloaded all kinds of ready codes and in any case I can not get information similar to what I should get.
Examples of information that should get: $ GPGSV, 9,12,157,31,20,65,236,22,23,18,177,14,28,18, 261,20 * 7C

In the best case I have strings of numbers eg 1291858810812919222291280192291290128330176255
I use this code:

Quote

# include <SoftwareSerial.h>

SoftwareSerial gps = SoftwareSerial (4,3);

void setup ()
{
Serial.begin (9600);
gps.begin (4800);

}


void loop ()
{
while (gps.available ())
{
byte c = gps.read ();
Serial.print (c);

}
delay (100);
}






I really need help.
Thanks to those who can help.

48X24X48X

I think most uBlox GPS comes default at 9600 bps instead of 4800 bps like the rest.
I used both MAX-6Q and NEO-6M, both work at 9600 bps out of the box.

i just try to do that and Still recive strings of numbers......

now i get garvege like that: 

this garvege came after casting     Serial.write(byte(serialGps.read()));
what is the cast i need for propper data recive?


jean23

I have exactly the same problem, sometimes I receive garvege like u and sometimes nothing.

I use Arduino example code :
Quote
/*
  Serial Event example

When new serial data arrives, this sketch adds it to a String.
When a newline is received, the loop prints the string and
clears it.

A good test for this is to try it with a GPS receiver
that sends out NMEA 0183 sentences.

Created 9 May 2011
by Tom Igoe

This example code is in the public domain.

http://www.arduino.cc/en/Tutorial/SerialEvent

*/

String inputString = "";         // a string to hold incoming data
boolean stringComplete = false;  // whether the string is complete

void setup() {
  // initialize serial:
  Serial.begin(9600);
  // reserve 200 bytes for the inputString:
  inputString.reserve(200);
}

void loop() {
  // print the string when a newline arrives:
  if (stringComplete) {
    Serial.println(inputString);
    // clear the string:
    inputString = "";
    stringComplete = false;
  }
}

/*
  SerialEvent occurs whenever a new data comes in the
hardware serial RX.  This routine is run between each
time loop() runs, so using delay inside loop can delay
response.  Multiple bytes of data may be available.
*/
void serialEvent() {
  while (Serial.available()) {
    // get the new byte:
    char inChar = (char)Serial.read();
    // add it to the inputString:
    inputString += inChar;
    // if the incoming character is a newline, set a flag
    // so the main loop can do something about it:
    if (inChar == '\n') {
      stringComplete = true;
    }
  }
}


Thanks for your help

Jean

Hello i use the arduino uno and i folow this steps

Here:
http://www.ardushop.com/component/u-blox-neo-6m-gps-module-for-arduino-s-ide-sensor.html


but on code i use the adafruit libraries the ECHO example.

Good Luck



Go Up