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
long_val from the GPS module. The
get_gps_data() function returns a JSON value. This makes our program,