In this instructable i show how you can build a arduino gps device that tracks your position, speed, temperature and light intensity. I also show code how to build a client that downloads that data automatically to your pc and a GUI that graps the data and shows the map using the google maps api. I wont show any example maps or video's as they reveal where i live. This was a school project, and i do not claim that this is a finished product. To be clear, build at your own risk.
Step 1: Hardware and Software Needed
You need this hardware:
Some GPS, i have a ublox neo6mv2 gps.
The arduino yun, or some arduin with a wifi and sd card shield.
A temperature sensor.
A Light intensity sensor.
The arduino IDE.
Some coding ide with your preferred language. I use Visual studio and C#.
NOTE: to understand, some programming experience is needed. I cannot explain 1000 lines of code in great detail. Also you need some basic math skills.
Step 2: Building the Device
The soldering is dead simple.
For the gps, just connect VCC to 5V, Ground to ground and the gps's TX to the rx of the arduino. I use port 8 as Software serial, but you can change that in the code.
For the temperature sensor, connect vcc to 5v and ground to ground, and the middle pin to any analog port you want.
The light sensor is even easier. Connect 5V to one pin and some analog port to the other pin.
That's it. All soldering is done now.
Step 3: Now the Fun Part, Coding.
First we need to program the yun.
I cannot add source code to this page so there is a download.
What it does:
The code starts the SD card.
Then it will look for the right NMEA string and save it in a buffer. After that is done it will write the buffer to the sd card. It also checks the sensor values and writes them onto the sd card. This happends at 1 fps.
Step 4: Coding the Pc Client.
The arduino yun has wifi.
folow the link to configure your yun.
Now our program can access the sd card.
In downloader.cs you will find the code that downloads and formats the files from your yun. It stores them on your disk. It generates maps with the google maps api. The documentation speaks for itself: https://developers.google.com/maps/documentation/s...
Math.cs has code to convert the raw gps data to a format that google maps can work with.
You can find details here: https://en.wikipedia.org/wiki/Haversine_formula
You need to make an instance of Downloader() in your Main();
Step 5: The GUI Application
Now we need an application to graph the data and draw the maps.
All the code is in logic.cs. Form1.cs only handles the events for all the gui components. Make sure you use [STAThread] in program.cs Form1.Designer.cs contains auto generated code. This code builds all the buttons and text area's ect. You can see that i use a super simple method to graph the data. The code should be easy to read if you have a bit of programming experience.
Step 6: The End
With all the code and super simple arduino build, you now can build this device.
I recommend getting A BETTER GPS. mine is pretty bad. It takes ages to lock down and does weird thing. It is cheap. I hope the code is easy enough to understand for beginners.