O'Reilly logo

Smart Internet of Things Projects by Agus Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a car-based GPS

In the previous section, we learned how to access Google Maps API on a Python program using the Flask library. Now we can combine our previous work about reading GPS on the Pololu Zumo robot.

After the program reads the GPS data on Arduino, we can send the GPS data to our web server (Flask framework).

Firstly, we modify gpsapp.py to read the GPS data. You can read it directly from the GPS module or via the middleware app on the computer.

We will create a new routing /gps which is implemented on the get_gps_data() function. With this function, we will set the value "hardcoded". Basically, you should get lat_val and long_val from the GPS module. The get_gps_data() function returns a JSON value. This makes our program, gspapp.py ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required