CHAPTER 9 ■ IOT PATTERNS: LOCATION AWARE
Summary
In this chapter you learned about location-aware things. They have many great uses, and,
when combined with other sensors, they can improve so many aspects of our lives, such
as emergency response, maintenance and optimized routing, and more.
You developed an IoT application that published livestock tracking data to a server
where this information was displayed on a map. You can improve quite a few other
applications that you developed in previous chapters by making them location-aware,
including:
- The intrusion detection system from Chapter 5. When an
intrusion is detected, you can send alerts to the security company
with the exact coordinates so that they can send someone to
investigate.
- The smart parking system from Chapter 7. You can provide exact
coordinates of a parking spot so that drivers looking for parking
spots can enter the coordinates in their GPS for directions.
Not all scenarios will need a purpose-built GPS module. Smartphones are location-
aware as well and can be used for building IoT applications. For scenarios such as
livestock tracking, you need to attach purpose-built GPS modules, but for other scenarios,
such as a car mileage tracker, you have the option to use smartphones as well.
Figure 9-10. The final version of the livestock tracking system
Once the GPS has initialized, which might take a few seconds, it will publish the
current coordinates to the server. Check your web app by accessing the project URL; in
this case it was http://bookapps.codifythings.com/gpstracker. Your web app should
look similar to Figure 9-10.