Cart 0

GPS + Camera fun with the Raspberry Pi

Posted by Craig L on

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 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!  

Share this post

← Older Post Newer Post →


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

    Craig on
  • 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!

    Sean on
  • Gary,

    We don’t have any long Raspberry Pi cables, but I found a link to someone that made one:

    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:

    For making timelapse videos, check out this blog post:


    Craig L on
  • 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?

    gary brown on

Leave a comment

Please note, comments must be approved before they are published.