Build

Building a Dash Cam with Raspberry Pi, JavaScript

1 min readPubNub Staff on Oct 19, 2016
Try PubNub Today

Free up to 1MM monthly messages. No credit card required.

Subscribe to our newsletter

By submitting this form, you are agreeing to our Terms and Conditions and Privacy Policy.

Dash cams have become very popular in the last few years. They even captured a giant meteor in Russia a few years ago. Seriously, a meteor! Why are they so popular? They are both useful and pretty sim...

Dash cams have become very popular in the last few years. They even captured a giant meteor in Russia a few years ago. Seriously, a meteor!

Why are they so popular? They are both useful and pretty simple. So simple, in fact, you can build your very own using JavaScript, a Raspberry Pi and some UI code, hooked together with PubNub. That’s it! Here are two tutorials by Sunny Gleason that show you how to do just that.

Dashcam Footage

Part 1: Assembling the hardware

In part one, you’ll put together a Raspberry Pi 2 Model B and the standard 8 Mpix camera module along with a tiny wifi adapter. Sunny shows you how to set up the operating system, configure the camera, and connect to your PubNub account. Finally you’ll build a small Node script to capture periodic images and send them to PubNub with some clever chunking.

Part 2: Dash Cam Viewer

In part two you’ll build an Angular JS based UI to view the live images on your phone, streamed through the PubNub channel of your choice, and using Bootstrap for a nice clean look.

As this series proves, the Raspberry Pi is an amazingly flexible and versatile device. Starting with Sunny’s project you could easily add a license plate reader, automatically tweet interesting shots, or even do face detection.

More from PubNub

Can Empathy Exist in the Metaverse
News May 16, 20221 min read

Can Empathy Exist in the Metaverse

A roundtable discussion led by PubNub’s COO, Casey Clegg, exploring the topics of what it means to be human in a virtual world.

PubNub Staff

PubNub Staff

How to Advance Telehealth and Virtual Care Technologies
News May 2, 20221 min read

How to Advance Telehealth and Virtual Care Technologies

Dr. Joe Kvedar, Chair of the Board for the American Telemedicine Association, joins our COO, Casey Clegg, to discuss why...

PubNub Staff

PubNub Staff

Another Step Towards Data Security: ISO-27001 Implementation
BuildMay 2, 20221 min read

Another Step Towards Data Security: ISO-27001 Implementation

Today, we are glad to announce that we are currently in the process of implementing ISO-27001 security standards.

PubNub Staff

PubNub Staff