The idea of this project is to take GPS data for your current location, read and parse NMEA sentences, find the GPS co-ords and then send those to Google who will respond with an address which is displayed in the serial monitor.
This GPS module is about as plug and play as it gets. All you need to do is set up a serial connection between it and an ESP32's secondary serial and it constantly spews out NMEA Strings. To understand what individual Strings mean go to :
To convert the latitude and longitude to human readable format, a GET request is sent to Google Maps Geocoding API. For a request containing LAT & LONG and your API key, you will receive a response containing the postal address.
To use Maps API you need to register for a developer account on Google, and enable billing (Dont worry, you get $300 free credit to use in a year).
Go to :
- Either set up an account or login
- Go to APIs
- Create a new project "ESP32Geocode"
Open this guide:
- Find the "Get started" button
- Select Places
- and project is "ESP32Geocode"
This will now enable Google maps platform for your project and give you back an API Key
This is the key you need to make the request !!!Script Edits & Libraries:
You will need to install the ArduinoJson library through the Arduino IDE
const char* ssid = "SSID"; const char* password = "PSK";
String urlKey = "&key=AIzaSyAdasjdk344kjdhk2489jkadw2sNxKJSD8"; // Note that you only replace the section after "&key=