Giter Site home page Giter Site logo

pi-helmet-cam's Introduction

pi-helmet-cam

Software for a Raspberry Pi Zero W motorcycle helmet camera.

Automatically starts recording when powered on, removing old videos if necessary, and uploads everything on youtube (convenient private storage with no visible limits) when network is available.

Based on similar implementation from @nicolashahn, but with improved software (auto merging of video files and youtube uploads) and mounted inside of the helmet instead of outside (this could change, but it's nice to have such a small camera which could be mounted anywhere).

Necessary Hardware

  • Raspberry Pi Zero W
  • Raspberry Pi camera v2 with correct ribbon cable (Zero cable is different than full sized Pi's)
  • MicroSD card
    • get one of the 'high endurance' ones since this will be writing HD video constantly
  • Battery
    • Simplest solution is a smartphone external battery pack with magnetic microUSB cable (WSKEN X-Cable Round in my case -- make sure it connects properly by itself) and keep it in your jacket/backpack sample
  • Camera housing/mounting
    • Cover both raspberry and camera with epoxy to make them resistant to water with electrical tape on top of it img_20171217_193939 img_20171217_193957 img_20171217_201024
    • Velcro straps to secure the camera module, one glued on camera's back, another two strapped on helmet's velcro pads. One is "L" shaped in between the pads, another one on top of it to create "T" shape, and camera goes on top of "T". Could be impossible with your helmet though img_20171219_015646
    • Electrical tape for mounting raspberry to the helmet img_20171219_010251 img_20171219_010307 img_20171219_010328

Setup Instructions

  • Download Rasbian Lite and use etcher to install it on an SD Card

  • Create empty ssh file on boot partition created above to allow SSH access

  • Configure and copy wpa_supplicant.conf file to setup wireless network

  • Plug in the card and you should be ready to connect by e.g. ssh [email protected] (lookup the IP using arp -a or something) with default password being raspberry

  • Use sudo raspi-config to enable camera interface and change your password

  • Optionally copy a public key from your local machine ssh-copy-id [email protected]

  • sudo apt-get update

  • Install git sudo apt-get install -y git

  • Clone this repo git clone https://github.com/sadovnychyi/pi-helmet-cam.git

  • Generate client_secret.json from Google Cloud Console (select 'Other' as application type) and click download JSON

  • Copy client_secret.json onto your raspberry in project folder scp client_secret.json [email protected]:~/pi-helmet-cam

  • Run make from project folder โ€“ this will install dependencies and generate credentials based on your app secrets

  • Run sudo crontab -e and add this line to the bottom:

    * * * * * /sbin/fake-hwclock save
    @reboot /home/pi/pi-helmet-cam/camera.py > /home/pi/pi-helmet-cam/cron.log 2>&1

You can check cron.log (latest session only) or camera.log (full history) for troubleshooting.

pi-helmet-cam's People

Contributors

sadovnychyi avatar nicolashahn avatar

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.