Introduction: Making a GeoFence Using Linkit One
Geofence are georaphical boundaries which when entered or left will trigger certain outputs. In this instructable I'm gonna make a geofence of desired radius which when entered will trigger an SMS, "Device in RADIUS".
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Connections
You will need to use a standard SIM card. Insert the sim card in the SIM tray.
Also Attach the GSM antenna ti the board.
Also since we are using the GPS module, connect the GPS antenna as well
NOTE: The antenna connectors are extremely delicate, handle them carefully
Step 2: Calculations
From the Average raduis of the earth, I calculated the per degree offset in meters, which 111194.9m
Also we use the circle equations to find the locas of all the points within the radius at any particular centre.
Step 3: Code
Change the values of centerlongitude, centerlatitude with the coordinates of the center of your geofence. Also change the value of radius in meters.
Now, in the loop, replace YOUR_NUMBER with the cell phone number to be notified.
Step 4: Compile, Run
Compile and upload the code to the board.
Keep the antenna of the board in an open space so that to increase precision and accuracy.
Keep radius as large as possible (possibly in km) so that the round offs in the calculations is compensated for