IoT based Asset Tracking Solution using Particle Asset Tracker Kit
Internet of Things (IoT) refers to Network of physical things embedded with electronics, software, sensors and connectivity which enables these things to connect and exchange data.
Refer the below image with the above definition for better understanding.
Asset Tracking solution refers to the method of tracking the location of any physical asset.
There are many devices available in the market. I have chosen Particle Electron Asset Tracking kit. Because, it has both cellular and GPS modules along with the resources, libraries, IDE and cloud solution to connect, control and collect information from the IoT devices.
Let us see how to build the solution.
Download and install the tools, resources and the IDE. Refer the Particle docs here. Using the Desktop IDE (Dev) you can write code, debug and flash the firmware in the Particle Electron device. Alternatively, you can use the Cloud IDE.
Import the Particle core library. It enables the communication with the particle cloud. Also, it has functions to read the battery percentage and other information about the device.
Import the Asset Tracker library and activate the GPS module to get the geographic coordinates. The timer is set to 2 minutes to fetch location.
Import Google Maps Device Locator library, to get the proximal cellular tower information. The Google Maps service decodes the cellular tower information and provides the geographic coordinates in the locationCallback() method. I used this as a fallback condition when we face GPS connectivity issues.
Finally, Call the Particle “publish” method to update the data to the cloud.
Refer the below code:
Run the code. It will compile to create a binary (.bin file). Flash this file in the Particle Electron device and power up the device with the battery.
Now, you can see the Tracking updates in the Particle cloud console. The Particle cloud provides access to tracking data through an API. We can create Web / Mobile application by consuming this API to provide tracking solutions.
Using this, I created a simple web application to see the live tracking update of the Asset in Google map.