Get the location of a moving object by getting the coordinates (longitude and latitude) easily from your phone
using two lines of code in your sketch and take a certain action.
This shield is one of the sensor shields. Sensor shields allows you to tap into your smartphone’s sensors and use in prototyping with Arduino, you can get information from the surrounding environment and use
it to trigger a certain action.Learn more from the sensor shields tutorial.
GPS Library allows Arduino board to get location data from the smartphone’s gps and takes certain actions within these data.
Adding #define CUSTOM_SETTINGS along with #define INCLUDE_GPS_SENSOR_SHIELD is a key that will let you unlock the GPS sensor shield only amongst all shields and prevent 1Sheeld library from eating your memory specially for UNO board.
For Android M(6) or greater, there are permissions to be granted before using the Data Logger shield, please make sure to grant the permissions or else it may affect the application’s performance.
Returns current latitude according to the smartphone’s current place.
Returns a float holding latitude value in degrees.
float latitude = GPS.getLatitude();
Returns current longitude according to the smartphone’s current place.
Returns a float holding longitude value in degrees.
float longitude = GPS.getLongitude();
Checks if your smartphone is in range giving the fixed latitude and longitude and range to be compared in meters.
Returns a Yes “1” or No “0”.
– 1st Parameter takes a float holding the fixed value of latitude.
– 2nd Parameter takes a float holding the fixed value of longitude.
– 3rd Parameter takes a float holding the range to be checked on in meters.
Sets a certain individual function written by the user in the sketch to be called and runs its functionality once a latitude or longitude change occurs.
&userFunctionName: takes the physical address of the userFunction in the memory and jump to it once called to execute it’s functionality.
/* myFunction exists under the loop function. */
/* This function will be invoked each time a new value comes to arduino from the
smartphones gps sensor. */
void myFunction (float latitude , float longitude)
/* Turn on the led once any button is pressed*/