Skip to content

GPS + Camera fun with the Raspberry Pi

We had some fun with our Raspberry Pi last weekend on a road trip to Michigan.  We mounted the Raspberry Pi Camera Module using a hacked up Multicomp case, and we also ran one of our GPS modules to track our position!  We found this article to be quite helpful in getting our GPS to work.

 

First off, a bit about our setup.  Here is a video showing the setup and the output from the GPS: 

To control the Pi in the car, we used on of our mini keyboards.  Naturally we did not type as we drove!

 

 

 

On the way out of Chicago, we had the camera mounted in the back window.  Here is a timelapse showing our drive from Wilmette, IL all the way to Grand Blanc, MI.  The video takes nearly 5 hours and compresses it to 1.5 minutes!

 

When we arrived at our destination, we discovered that the GPS logging wasn't working.  It turns out we started the logger before we started the GPS Daemon (I hate it when that happens).  So no GPS data for the trip to Michigan.

The next day we fixed that problem and got some good GPS data for our initial drive from Grand Blanc to Lansing.  Using the command "gpxlogger -d -f trip.log", you can log the data to a file.  Then, just use a site like gpsvisualizer.com to process the data into a Google map like this one:
Along that route we also logged our pictures into another timelapse, this time with the Raspberry Pi camera mounted in the front of the car.  We used the program "mencoder" to encode the video into an .avi file right on the Pi.  We probably need to play with the frame rate a bit to make this smoother, but not bad for a $35 computer!  
Previous article Lower International Shipping Rates!

Comments

Craig - December 3, 2014

I am pretty sure you could have a CRON job that checks for connectivity and then sends the file.

Sean - November 16, 2014

Great article! I’ve got a Pi set up to create a .GPX file as well as a current position .KML file. Is there a way to have the Pi auto-upload either/both those files whenever it comes into wifi range of home, or as the signal drops and reconnects with a 3G dongle? Thanks!

Craig L - July 27, 2013

Gary,

We don’t have any long Raspberry Pi cables, but I found a link to someone that made one: http://www.raspberrypi.org/phpBB3/viewtopic.php?p=362714#p362714

That is a great idea for a new product, BTW!

We haven’t figured out how to marry up the GPS and photo data, but I am sure it can be done. We got the GPS code off Adafruit’s tutorial site: http://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi

For making timelapse videos, check out this blog post: http://chicagodist.com/blogs/news/8287563-raspberry-pi-camera-for-timelapse-videos

cheers,
Craig

gary brown - July 26, 2013

This is EXACTLY what I want to add to my little 16’ Scamp fiberglass trailer. I figured on putting my Pi in the trailer with the GPS and Camera at appropriate spots. The GPS would detect movement. When the Scamp is still… one picture every couple of minutes. When “on the road”… every 15 seconds.

Do you have any code and construction details? BTW… do you know if the camera cable can be extended with an added cable, or is it tied to it’s given length by the Magic of Electronics?

Leave a comment

Comments must be approved before appearing

* Required fields

Compare products

{"one"=>"Select 2 or 3 items to compare", "other"=>"{{ count }} of 3 items selected"}

Select first item to compare

Select second item to compare

Select third item to compare

Compare