Coder Social home page Coder Social logo

karlexceed / picturesandplaces Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 13 KB

A collection of scripts for logging GPS data and taking periodic / timelapse photos via webcam on a Raspberry Pi. Intended for use in vehicles on roadtrips.

License: Mozilla Public License 2.0

Python 97.31% Shell 2.69%

picturesandplaces's Introduction

PicturesAndPlaces

A collection of scripts for logging GPS data and taking periodic / timelapse photos via webcam on a Raspberry Pi. Intended for use in vehicles on roadtrips.

This code is a one-off project written over a couple weeks in preparation for a road trip way out west. I apologize for the mess.

You can read more at my website: http://wiki.exceedindustries.net/index.php?title=GPS_logger_%26_time_lapse_image_device

Hardware

  • Raspberry Pi Model B
    • Running latest Raspbian
  • BU-353 S4 USB GPS Reciever
  • Logitech C270 HD webcam
  • A nice univeral car charger with a USB port

Dependencies

sudo apt-get install gpsd gpsd-clients python-gps sqlite3 fswebcam

GPS Install and Test

  1. Install the dependencies as listed above.
  2. Plug in the GPS unit to an open USB port. Be near a window, or better yet, outdoors.
  3. Open a terminal and:
    • Run dmesg to see the device name of your GPS (likely /dev/ttyUSB0)
    • Run cgps and/or xgps to verify GPS functionality

Camera Install and Test

  1. Assuming you've installed the dependencies...
  2. Plug in the webcam to an open USB port
  3. Run fswebacm and adjust camera
  4. Tip: Try experimenting with the -S flag of fswebcam. It tells your camera to take a few pictures, but only returns the last one taken. This allows your webcam to auto-focus and/or adjust light levels. I've found a value between 3-10 is about right; it all depends on the webcam in use.

Raspberry Pi Specific

sudo pip install RPi.GPIO

Edit /etc/default/gpsd:

START_DAEMON="true"
GPSD_OPTIONS="/dev/ttyUSB0"

Create /home/pi/launcher.sh:

#!/bin/sh
# launcher.sh
# You can cd or skip the next line and add the full path to the last line
# but be careful if your script relies on relative paths?
cd /home/pi/logger
sudo python your_script.py

Edit /etc/xdg/lxsession/LXDE-pi/autostart:

Add to the bottom:

@lxterminal -e /home/pi/launcher.sh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.