Go Down

Topic: GPS vs Ai Thinker A7 module (Read 18344 times) previous topic - next topic

-dev

The code from that other thread assumes that you are not connecting the GPS_TXD line.

I would suggest connecting the GPS_TXD line to an Arduino receive pin, because you can get GPS information even when the A7 is busy doing something else, and you don't have to send special commands to make the A7 "forward" the GPS information to the U_TXD pin.

Did you try anything I suggested in reply #28?

charlilio

#31
Oct 12, 2017, 07:30 pm Last Edit: Oct 12, 2017, 07:43 pm by charlilio
The code from that other thread assumes that you are not connecting the GPS_TXD line.

I would suggest connecting the GPS_TXD line to an Arduino receive pin, because you can get GPS information even when the A7 is busy doing something else, and you don't have to send special commands to make the A7 "forward" the GPS information to the U_TXD pin.

Did you try anything I suggested in reply #28?
hi sir -dev

i've try what you said on reply #28 but the data gps still not showing.

on serial monitoring just show message like this :

AT+GPS=1
AT+GPSRD=1
Waiting for GPS fix...............................................................................................

and here my config pin

A7 ===== Uno

GND======> GND
GPS_TDX===> PIN 0
U_RXD ====> PIN 8
U_TXD ====> PIN 9

and for the code i still use this thread on reply #10

and i use :

#include <AltSoftSerial.h>
AltSoftSerial A7board;

is it there something wrong sir?
because i still not get gps data

-dev

Unfortunately, I see that GPS_TXD may not provide NMEA data (see reply #20).

If you tried this:

Code: [Select]
#include <AltSoftSerial.h>
AltSoftSerial A7board;

#define gpsPort Serial // just an alias so it is easier to read below

void loop()
{
  switch (state) {

      ...

    case GPS_READING:
      while (gps.available( gpsPort )) { // parse the NMEA data from pin 0
        fix = gps.read(); // this structure now contains all the GPS fields

... and did not get any GPS data, then GPS_TXD does not work.

You may have to try the command sequence in reply #25.

You could try the NeoGPS example NMEA.ino.  It expects to receive GPS data on Arduino pin 8, if you can connect it to the GPS_TXD pin.  If you don't want to move wires, you must edit GPSport.h to use Serial (see Installation instructions).

Or try a simple echo test:

Code: [Select]
void setup()
{
  Serial.begin( 9600 );
}

void loop()
{
  if (Serial.available()) // any GPS characters?
    Serial.write( Serial.read() ); // echo to Serial Monitor window
}

If you see NMEA sentences, like $GPRMC or $GPGGA, then GPS_TXD does work.

tcotduino01

#33
Oct 13, 2017, 01:07 am Last Edit: Oct 13, 2017, 01:22 am by tcotduino01
Well... there is a lot of things going wrong according to my experiments of today.

I have the exact same module as charlilio.

1 - The provided antenna is super weak, there is no way you could lock a signal indoors. I had to go outdoors to acquire a signal and finally see it working. Even outdoors, it take ages to acquire the satellites and sometimes, the signal drops and go to acquiring forever.

2 - The way the sketch works is not helping either. It sends commands to the GPS module which blocks everything on it until it get a proper GPRMC. Then it sends a AT+GPS=0, then eratic commands if I refer to the TTY output where I got a series of random OK OK OK OK OK OK OK *OK OK * GPSRD=5 OK ....etc....
At some point, it resends the AT+GPS=1 followed by AT+GPSRD=1 and... you wait forever because the module is stuck.

3 - Using the GPSRD method adds an annoying +GPSRD: in front of the first line $GPGGA, parsers cannot understand that line.

Finally I ended up with a very basic setup to make sure that the GPS is working properly and I will see later how I could automate and parse that nicely with an Arduino UNO. I never achieved to lock a signal indoors though.

My goal is to make it working with an arduino mini pro or even an ATtiny.

Hardware:

- Arduino UNO R3
- A7 GPRS/GPS/GSM module (if you don't want to press that *$$$##@@ button everytime you power it, you can short v_BAT and PWR_KEY. It is documented ....in chinese...

Connections:

A7                UNO

U_TXD          TX (pin1)
U_RXD          RX (pin 0)
GND             GND

Sketch:

Load a new blank sketch on the Arduino and once done, open a monitor at 9600 bauds.


Commands:

AT    check connection, should reply OK

AT+GPS=1       start the GPS module, powers the GPS antenna at 1.79 V, start searching satellites and push data to GPS_TXD

AT+GPSRD=1   forwards the GPS data to the UART ports whilst still pushing the data on GPS_TXD

GPS_TXD can be connected to TX on UNO once the GPS module has been started.

AT+GPS=0        stops the GPS module and stops the power on the GPS antenna

AT+GPSRD=0   stops the forwarding of GPS data to the console while keeping the data flow to GPS_TXD

If you want to check the data, there is a free online parser here


charlilio

Hi sir  tcotduino01 and -dev

I've tried the suggestions from both of you, but it does not work both...

so i've another sample from this but i stuck on "AT+CPIN?" and wait forever because the module is stuck.

Connection :

A7 ====== UNO

GND        ==> GND
GPS_TXD ==> PIN 10
U_TXD     ==> PIN 0
U_RXD     ==> PIN 1

for power A7 i use external power adaptor 9v also i connected the pwr_key pin to v_bat pin.
for power uno i use usb cable.

here the following my code :
Code: [Select]

#include <NeoSWSerial.h>
NeoSWSerial gps(10,11); // RX, TX

//String str="";
char str[70]; //is used for storing received message from GSM module
String gpsString=""; //is used for storing GPS string

char *test="$GPGGA"; //is used to compare the right string that we need for coordinates.

String latitude="No Range      ";
String longitude="No Range     ";

int temp=0,i;
boolean gps_status=0;

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

  Serial.println("Vehicle Tracking");
 
  delay(2000);
  gsm_init();
 
  Serial.println("AT+CNMI=2,2,0,0,0");
  Serial.println("GPS Initializing");
 
  Serial.println("  No GPS Range  ");
  get_gps();
  delay(2000);
 
  Serial.println("GPS Range Found");
 
  Serial.println("GPS is Ready");
  delay(2000);
 
  Serial.println("System Ready");
  temp=0;
}

void loop()
{
  serialEvent();
  if(temp)
  {
    get_gps();
    tracking();
  }
}

void serialEvent() //is used for receiving message from GSM and comparing the received message with predefined message (Track Vehicle).
{
  while(Serial.available())
  {
    if(Serial.find("Track Vehicle"))
    {
      temp=1;
      break;
    }
    else
    temp=0;
  }
}

void gpsEvent() // is used for receiving GPS data into the Arduino.
{
  gpsString="";
  while(1)
  {
   while (gps.available()>0)            //checking serial data from GPS
   {
    char inChar = (char)gps.read();
     gpsString+= inChar;                    //store data from GPS into gpsString
     i++;
     if (i < 7)                     
     {
      if(gpsString[i-1] != test[i-1])         //checking for $GPGGA sentence
      {
        i=0;
        gpsString="";
      }
     }
    if(inChar=='\r')
    {
     if(i>65)
     {
       gps_status=1;
       break;
     }
     else
     {
       i=0;
     }
    }
  }
   if(gps_status)
    break;
  }
}


// gsm_init() is used for initialising and configuring the GSM Module, where firstly, GSM module is checked whether it is connected or not by sending 'AT' command to GSM module.
// If response OK is received, means it is ready. System keeps checking for the module until it becomes ready or until 'OK' is received.
// Then ECHO is turned off by sending the ATE0 command, otherwise GSM module will echo all the commands.
// Then finally Network availability is checked through the 'AT+CPIN?' command, if inserted card is SIM card and PIN is present, it gives the response +CPIN: READY.
// This is also check repeatedly until the network is found. This can be clearly understood by the link Video : https://www.youtube.com/watch?v=2Ud6sB3A8j0

void gsm_init()
{
 
  Serial.println("Finding Module..");
  boolean at_flag=1;
  while(at_flag)
  {
    Serial.println("AT");
    while(Serial.available()>0)
    {
      if(Serial.find("OK"))
      at_flag=0;
    }
   
    delay(1000);
  }

 
  Serial.println("Module Connected..");
  delay(1000);
 
  Serial.println("Disabling ECHO");
  boolean echo_flag=1;
  while(echo_flag)
  {
    Serial.println("ATE0");
    while(Serial.available()>0)
    {
      if(Serial.find("OK"))
      echo_flag=0;
    }
    delay(1000);
  }

 
  Serial.println("Echo OFF");
  delay(1000);
  Serial.println("Finding Network..");
  boolean net_flag=1;
  while(net_flag)
  {
    Serial.println("AT+CPIN?");
    while(Serial.available()>0)
    {
      if(Serial.find("+CPIN: READY"))
      net_flag=0;
    }
    delay(1000);
  }
  Serial.println("Network Found..");
  delay(1000);
 
}

void get_gps() //has been used to extract the coordinates from the received string.
{
   gps_status=0;
   int x=0;
   while(gps_status==0)
   {
    gpsEvent();
    int str_lenth=i;
    latitude="";
    longitude="";
    int comma=0;
    while(x<str_lenth)
    {
      if(gpsString[x]==',')
      comma++;
      if(comma==2)        //extract latitude from string
      latitude+=gpsString[x+1];     
      else if(comma==4)        //extract longitude from string
      longitude+=gpsString[x+1];
      x++;
    }
    int l1=latitude.length();
    latitude[l1-1]=' ';
    l1=longitude.length();
    longitude[l1-1]=' ';
    Serial.println("Lat:");
    Serial.println(latitude);
    Serial.println("Long:");
    Serial.println(longitude);
    i=0;x=0;
    str_lenth=0;
    delay(2000);
   }
}

void init_sms() //used to initialising and sending message
{
  Serial.println("AT+CMGF=1");
  delay(400);
  Serial.println("AT+CMGS=\"+62**********\"");   // use your 10 digit cell no. here
  delay(400);
}

void send_data(String message)
{
  Serial.println(message);
  delay(200);
}

void send_sms() //used to initialising and sending message
{
  Serial.write(26);
}

void lcd_status()
{
 
  Serial.println("Message Sent");
  delay(2000);
  Serial.println("System Ready");
  return;
}

void tracking()
{
    init_sms();
    send_data("Vehicle Tracking Alert:");
    send_data("Your Vehicle Current Location is:");
    Serial.print("Latitude:");
    send_data(latitude);
    Serial.print("Longitude:");
    send_data(longitude);
    send_data("Please take some action soon..\nThankyou");
    send_sms();
    delay(2000);
    lcd_status();
}


is there something wrong with the code ?

charlilio

hi guys

but when i use this code

Code: [Select]
#include <SoftwareSerial.h>

byte RX = 10; // This is your RX-Pin on Arduino UNO,connect with A7 UTXD pin
byte TX = 11; // This is your TX-Pin on Arduino UNO,connect with a7 URXD pin
SoftwareSerial *A7board = new SoftwareSerial(RX, TX);

void print_result()
{
  Serial.print("A7 board info: ");
  while( A7board->available() != 0)
    Serial.write( A7board->read());
   
  Serial.println(); 
}
//--------------------------------------------------------------------

void setup() {
  Serial.begin(115200);
  A7board->begin(115200);
  delay(200);

  Serial.println("Send AT command"); 
  A7board->println("AT");
  delay(25000);
  print_result();
 
  Serial.println("AT+GPS turn on"); 
  A7board->println("AT+GPS=1"); 
  delay(10000);
  print_result();
 
  Serial.println("AT+GPSRD turn on"); 
  A7board->println("AT+GPSRD=1"); 
  delay(10000);
  print_result();






 
}
//--------------------------------------------------------------------

void loop() {
  print_result();
  delay(2000);
}
//--------------------------------------------------------------------


serial monitor showing this :

Code: [Select]

Send AT command
A7 board info: OK


)⸮TZV:17/10/0n,14:25:36,)`7


⸮⸮RQ⸮'⸮⸮⸮٥⸮⸮⸮⸮j

AT+GPS turn on
A7 board info: AT+GPS=1
OK


AT+GPSRD turn on
A7 board info: AT+GPSQD=1

OK

)⸮PSRD:$GPGT⸮bbbbb⸮b⸮⸮babj⸮bj⸮b⸮⸮⸮⸮R⸮⸮j
$GP


A7 board info:
+GPSRD:$G⸮GGA,,,,,,0.00,,,M,,M,,0000*66
$GPQMC,,V,,,,,,&,,,N


A7 board info:
)⸮PSRD:$GPGG@\,,,,,0,00,.,M,,M,,0000)66
$GPGSA,P)bbbbbbbbbab


A7 board info:
+GPSRB:$GPGGA,,,.,,0,00,,,M,.M,,0000*66
$GPRMC,,V,,.,,,,,,,N
A7 board info:
+GPSRD:$u⸮bbbbb⸮b⸮⸮bbbj⸮bj⸮b⸮⸮⸮⸮R⸮⸮j
$GPQMC,,V,,,,,,.,,,N*


A7 board info:
+GPSRD:$G⸮GGA,,,,,,0.00,,,M,,M,,0000*66
$GPG⸮A,A,1,,,,,.,,,,




what is this, it is mean gps data ???

charlilio

Unfortunately, I see that GPS_TXD may not provide NMEA data (see reply #20).

If you tried this:

Code: [Select]
#include <AltSoftSerial.h>
AltSoftSerial A7board;

#define gpsPort Serial // just an alias so it is easier to read below

void loop()
{
  switch (state) {

      ...

    case GPS_READING:
      while (gps.available( gpsPort )) { // parse the NMEA data from pin 0
        fix = gps.read(); // this structure now contains all the GPS fields

... and did not get any GPS data, then GPS_TXD does not work.

You may have to try the command sequence in reply #25.

You could try the NeoGPS example NMEA.ino.  It expects to receive GPS data on Arduino pin 8, if you can connect it to the GPS_TXD pin.  If you don't want to move wires, you must edit GPSport.h to use Serial (see Installation instructions).

Or try a simple echo test:

Code: [Select]
void setup()
{
  Serial.begin( 9600 );
}

void loop()
{
  if (Serial.available()) // any GPS characters?
    Serial.write( Serial.read() ); // echo to Serial Monitor window
}

If you see NMEA sentences, like $GPRMC or $GPGGA, then GPS_TXD does work.
hi sir, have you read my latest post on this thread?

-dev

Quote from: charlilio
Quote from: /dev
Unfortunately, I see that GPS_TXD may not provide NMEA data (see reply #20).

If you tried this:

    <remainder deleted>
... have you read my latest post?
Please delete irrelevant parts of the quote.  We do not need to read previous posts *again*.

Quote
SoftwareSerial *A7board = new SoftwareSerial(RX, TX);
Why are you using new?  Just declare the variable:

Code: [Select]
SoftwareSerial A7board(RX, TX);
Then use a "." instead of "->":

Code: [Select]
   Serial.write( A7board.read() );
                        ^

Software serial ports rarely work at 115200.

Your sketch is receiving some GPS data, but

1)  The data is corrupted because the baud rate is too fast.  Either connect the A7Board to Serial (or Serial1, Serial2 or Serial3 if your board has extra HardwareSerial ports), or figure out how to change the baud rate.  AltSoftSerial might work better.   Have you read this?  Try the BEST choice first.

2)  The GPS device is not locked on to any satellites.  Either get closer to a window or go outside.  It can take 10 minutes or more to get the first fix.

Also, don't use delay.  If you use delay, the Arduino does not do anything besides twiddle its thumbs.  Characters may be arriving, but your sketch does not read them.  Eventually, the input buffer overflows and characters start getting dropped.  Do something like this instead:

Code: [Select]
void print_result_for( unsigned long waitMS )
{
  Serial.print( F("A7 board info: ") );  // F macro saves RAM!

  unsigned long startMS = millis();
  while (millis() - startMS < waitMS) {
    if ( A7board.available() ) {
      Serial.write( A7board.read() );
    }
  }
    
  Serial.println();  
}

void setup() {
  Serial.begin(115200);
  A7board.begin(115200);

  Serial.println( F("Send AT command") );
  A7board.println( F("AT") );
  print_result_for( 25000);

    ...

charlilio

1)  The data is corrupted because the baud rate is too fast.  Either connect the A7Board to Serial (or Serial1, Serial2 or Serial3 if your board has extra HardwareSerial ports), or figure out how to change the baud rate.  AltSoftSerial might work better.   Have you read this?  Try the BEST choice first.

2)  The GPS device is not locked on to any satellites.  Either get closer to a window or go outside.  It can take 10 minutes or more to get the first fix.

Also, don't use delay.  If you use delay, the Arduino does not do anything besides twiddle its thumbs.  Characters may be arriving, but your sketch does not read them.  Eventually, the input buffer overflows and characters start getting dropped.

when i used connection

a7 <=> uno
gnd <=> gnd
gps_txd <=> pin 0 as rx

serial monitor showing this
Code: [Select]

Send AT command
A7 board info: Send AT command
A7 board info:
A7 board info:
A7 board info:
A7 board info:
A7 board info:



when i used connection

a7 <=> uno
gnd <=> gnd
gps_txd <=> pin 0 as rx
u_txd <=> pint 8 as rx
u_rxd <=> pin 9 as tx

serial monitor showing this
Code: [Select]

A7 board info: Send AT command
A7 board info: Send AT command
A7 board info:
A7 board info:
A7 board info:
A7 board info:
A7 board info:
A7 board info:  


and last i try this connection
a7 <=> uno
gnd <=> gnd
gps_txd <=> pin 0 as rx
u_txd <=> pint 10 as rx
u_rxd <=> pin 11 as tx

serial monitor showing this
Code: [Select]

Send AT command
A7 boarSend AT command
A7 board info:
A7 board info:
A7 board info:
A7 board info:
A7 board info:


I tried it in front of the open window, and I put a7 module outside the window along with its arduino

here the code i've try sir

Code: [Select]

#include <SoftwareSerial.h>

byte RX = 0; // This is your RX-Pin on Arduino UNO,connect with A7 UTXD pin
byte TX = 1; // This is your TX-Pin on Arduino UNO,connect with a7 URXD pin

// Connection
//     A7 ==== UNO
// GND     <=> GND
// GPS_TXD <=> PIN 0 as RX
// U_TXD   <=> PIN 10 as RX I do not know for tx and rx on a7 should be connected to what pin
// U_RXD   <=> PIN 11 as TX I do not know for tx and rx on a7 should be connected to what pin

SoftwareSerial A7board(RX, TX);

void print_result_for( unsigned long waitMS )
{
  Serial.print( F("A7 board info: ") );  // F macro saves RAM!

  unsigned long startMS = millis();
  while (millis() - startMS < waitMS) {
    if ( A7board.available() ) {
      Serial.write( A7board.read() );
    }
  }
    
  Serial.println();  
}

void setup() {
  Serial.begin(115200);
  A7board.begin(115200);

  Serial.println( F("Send AT command") );
  A7board.println( F("AT") );
  print_result_for( 25000);

}

void loop() {
  // put your main code here, to run repeatedly:
   print_result_for( 25000); // should ia put this function here ?
}

charlilio

Also, don't use delay.  If you use delay, the Arduino does not do anything besides twiddle its thumbs.  Characters may be arriving, but your sketch does not read them.  Eventually, the input buffer overflows and characters start getting dropped.  Do something like this instead:
i also try this code from another reference

connection

A7 <=> UNO

GND <=> GND
GPS_TXD <=> PIN 3 as rx
U_TXD <=> PIN 0 as rx
U_RXD <=> PIN 1 as tx

and  here the code :
Code: [Select]

#include <SoftwareSerial.h>
#include <TinyGPS.h>

long lat,lon,latB,lonB;

SoftwareSerial gpsSerial(2,3); // (TX,RX)create gps sensor connection
TinyGPS gps; //create gps object

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);// connect serial
  gpsSerial.begin(115200);// connect gps sensor
}

void loop() {
  // put your main code here, to run repeatedly:
  while(gpsSerial.available()){//check for gps data
    if(gps.encode(gpsSerial.read())){//encode gps data
      gps.get_position(&lat,&lon);//get latitude and longitude
      latB=lat/100000;
      lonB=lon/100000;
      lat=lat-
      (latB*100000);
      lat=lat*(-1);
      lon=lon-
      (lonB*100000);
      Serial.print("AT+CMGS=");
      Serial.write(34);
      Serial.print("082129111432");
      Serial.write(34);Serial.write(13);
      Serial.print("\r\n");
      delay(1000);
      Serial.print("position:");
      Serial.print("\r\n");
      Serial.print("http://maps.google.com/maps?q=");
      Serial.print(latB);Serial.print(".");Serial.print(lat);
      Serial.print(",");// print latitude
      Serial.println(lonB);Serial.print(".");Serial.print(lon);//print langitude
      Serial.write(26);
      delay(5000);
    }
  }
}


fiyuuhh help me please to solved my problem T_T

-dev

Never use SoftwareSerial on pins 0 & 1.  Those pins are for the pre-defined HardwareSerial variable Serial.

Did you read Choosing a serial port?  If you don't understand it, ask a question.  Trying random sketches will not work when you don't understand what is happening.

Quote
when i used connection

a7 <=> uno
gnd <=> gnd
gps_txd <=> pin 0 as rx
u_txd <=> pint 8 as rx
u_rxd <=> pin 9 as tx
Those are the best connections to try.  Then you would use

Code: [Select]
#define gpsPort Serial // GPS_TXD to pin 0

#include <AltSoftSerial.h>
AltSoftSerial A7board;  // U_TXD to pin 8 and U_RXD to pin 9

void setup()
{
  Serial.begin(115200 );

  //gpsPort.begin( 115200 ); // not needed if gpsPort *is* Serial

  A7board.begin( 115200 ); // probably won't be reliable at this speed

  Serial.println( F("Send AT command") ); 
  A7board.println( F("AT") );
  print_result_for( 25000 );
 
  Serial.println( F("AT+GPS turn on") );
  A7board.println( F("AT+GPS=1") );
  print_result_for( 10000 );

  Serial.println("AT+GPSRD turn on"); 
  A7board->println("AT+GPSRD=1"); 
  print_result_for( 10000 );

  //  ... other commands you want to try?
}

void loop()
{
  print_result_for( 10000 );
}

Because there are two serial connections, you should print anything received on either connection:

Code: [Select]
void print_result_for( unsigned long waitMS )
{

  Serial.print( F("GPS info: ") );  // F macro saves RAM!

  unsigned long startMS = millis();
  while (millis() - startMS < waitMS) {
    if ( gpsPort.available() ) {
      Serial.write( gpsPort.read() );
    }
  }
  Serial.println(); 

  Serial.print( F("A7 info: ") );

  while ( A7board.available() ) {
    Serial.write( A7board.read() );
  }
  Serial.println(); 
}

This will print all the GPS data received during that time, but it will only print the first 64 characters of the A7 responses.  This is usually enough for the response to AT commands.

charlilio

Never use SoftwareSerial on pins 0 & 1.  Those pins are for the pre-defined HardwareSerial variable Serial.

Did you read Choosing a serial port?  If you don't understand it, ask a question.  Trying random sketches will not work when you don't understand what is happening.
Those are the best connections to try.
hi sir dev, i've read the "neoGPS choose a serial port" i dont understand what is
serial1, serial2, serial3 pin, on that article they not explain where the pin must be used...

if use the best 1 to choose serial port mean (gp_txd) then for pin u_rxd and pin u_txd is it still using for comunicate with arduino, therefore i just try random test :D

soo i just tried the instructions you gave in front of the open window, and this is the result this image

and here the code :

Code: [Select]

#define gpsPort Serial // GPS_TXD to pin 0

#include <AltSoftSerial.h>
AltSoftSerial A7board;  // U_TXD to pin 8 and U_RXD to pin 9

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

  //gpsPort.begin( 115200 ); // not needed if gpsPort *is* Serial

  A7board.begin( 9600 ); // probably won't be reliable at this speed

  Serial.println( F("Send AT command") );  
  A7board.println( F("AT") );
  print_result_for( 25000 );
  
  Serial.println( F("AT+GPS turn on") );
  A7board.println( F("AT+GPS=1") );
  print_result_for( 10000 );

  Serial.println("AT+GPSRD turn on");  
  A7board.println("AT+GPSRD=1");  
  print_result_for( 10000 );

  //  ... other commands you want to try?
}

void print_result_for( unsigned long waitMS )
{

  Serial.print( F("GPS info: ") );  // F macro saves RAM!

  unsigned long startMS = millis();
  while (millis() - startMS < waitMS) {
    if ( gpsPort.available() ) {
      Serial.write( gpsPort.read() );
    }
  }
  Serial.println();  

  Serial.print( F("A7 info: ") );

  while ( A7board.available() ) {
    Serial.write( A7board.read() );
  }
  Serial.println();  
}

void loop()
{
  print_result_for( 10000 );
}

-dev

Quote
i dont understand what is serial1, serial2, serial3
Google "Arduino serial2"?

Some Arduino boards have extra serial ports.  They are "HardwareSerial" ports.  The Serial variable is a HardwareSerial variable type.  Some boards (e.g., a Mega) have the extra variables for Serial1, Serial2 or Serial3 for the extra hardware serial pins.  They should be used instead of software serial ports like AltSoftSerial or SoftwareSerial.

Quote
this is the result: <image>
Instead of pasting an image that most people won't download from a google drive, just copy the text from the Serial Monitor window: Click at a starting point, then shift-click at the end.   The text should appear "selected" (all blue or inverted).  You can also use your mouse to select the text: press the left mouse button at the starting point (don't release), then drag the mouse to the end and release.

Then type ctrl-C ("copy").  That copies all the selected text to the "clipboard".  Then click in the Post editor here, and type ctrl-V ("paste").  Be sure to put code tags around the text, just like you did for your sketch.

If you really have something graphical to show us (not text), read these instructions.

I do not have one of these boards, so I cannot try the commands.  I can only suggest how to connect the two serial ports and help with a sketch that shows the results of the commands.  Reply #33 has lots of good information about the commands you need to send.

charlilio

I do not have one of these boards, so I cannot try the commands.  I can only suggest how to connect the two serial ports and help with a sketch that shows the results of the commands.  Reply #33 has lots of good information about the commands you need to send.
hi sir, about serial oke will find it, and about result of serial monitor some time they won't copied all so i screen shoot my monitor sorry about that sir :D

i've try thread on reply #33 about i don't know why it is still not working sir ...

ok thank you very much sir you have helped me to solve my problem, maybe i will try with another module or i'll change the antenna gps. maybe that the problem i don't know... just my guess.
unfortunately this problem can not be resolved ... it's been 2 weeks : (


Thank you sir @-dev

charlilio

• Ai Thinker A7 (for GPS I bought another antenna, because antenna shipped with board is not compatible for GPS signal).
hi sliekas_satanistas

Could you please tell me specifically what kind or model of GPS antenna did you buy ?
can you share the link of your GPS antenna type ?


Thank you

Go Up