Go Down

Topic: GPS and MKR GSM 1400 (Read 1 time) previous topic - next topic

kevinmalcolm

I would like to use the GSM 1400 as a GPS tracker.  The project hub has an example called: Get the position of your MKR GSM 1400 on your smartphone through an SMS with a Google Maps link.
Has anybody tried this successfully.
I have copied the code to my laptop IDE but it will not upload onto the 1400.  I am not sure about the arduino_secrets.h file that includes the sensible data like PIN, APN, user and password. Do I take this out of the code.  I am new to arduino and lack software experience.
Any support would be appreciated.

ninora

data like PIN, APN, user and password
In most case you don't need to provide the information, it simply does not exist, so modify the code:
Code: [Select]
char PINNUMBER [] = SECRET_PINNUMBER;
char GPRS_APN[] = SECRET_GPRS_APN;
char GPRS_LOGIN [] =SECRET_GPRS_LOGIN;
char GPRS_PASSWORD[] =SECRET_GPRS_PASSWORD;


to look like this:
Code: [Select]
char PINNUMBER [] = '';
char GPRS_APN[] = '';
char GPRS_LOGIN [] = '';
char GPRS_PASSWORD[] = '';



intstarep

1. You need a GPS Module attached. (The location out of the gsm antennas triangle method is not accurate)
2. Read the position from the module (You should find example code for your module)
3.
       sms.beginSMS(TELEFON_NR);
       sms.print("https://www.google.com/maps/search/?api=1&query=");
        sms.print(latitude, 5);
        sms.print(",");
        sms.print(longitude, 5);
        sms.print("\n\nPosition:\n\n");
        sms.print(latitude, 5);
        sms.print(" Lat.\n");
        sms.print(longitude, 5);
        sms.print(" Lon.\n");
 sms.endSMS();
      sms.flush();

Go Up