GPS with Explore M3
In the serial communication tutorial, I had said that having multiple HW UARTs is very handy. So in this tutorial, we will be interfacing ublox NEO6 based GPS module with one hardware serial port and log the data with the help of USB Serial.
Thanks to the TinyGPSplus library, this was a piece of cake. I did make a couple of changes to use the HW serial port instead of soft serial and set the device baud rate to 9600 instead of 4800. You could see these lines commented in the code.
Contents
Hook Up
The hook was pretty straight forward as below:
Explore M3 | GPS | Description |
---|---|---|
5v | VCC | The module has onboard 3.3v regulator! (RED) |
1 (Txd) | Rxd | Pin 1 of Explore M3 is connected to Receive pin of GPS(GREEN) |
0 (Rxd) | Txd | Pin 0 of Explore M3 is connected to Transmit pin of GPS(WHITE) |
GND | GND | The holy ground(BLACK) |
Code
Demo
Although the weather was cloudy today, the GPS was quite accurate. You can fiddle around with the code to show number of satellites, time etc. Below is the log of latitude, longitude and time.
Location on Google Maps
Did a quick search for the location on from the log on google maps and you see; it seems to be fairly accurate, near our Office with the star mark there!
I wish, we could do a battery powered GSM GPS logger with Explore M3 and plot that on the map. What do you think?