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 ...

Get Smart Internet of Things Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.