Put camera glasses on to your Raspberry Pi Zero

Following up after my first article on how to setup a Raspberry Pi Zero, I want to walk you through connecting a camera to it.

Used hardware:

Used software:

Find out about your OS version by running cat /etc/os-release

My kernel version is 4.14.98+ #2100. To know yours, run uname -a

Don’t worry if the kernel version does not exactly match yours, as long as you use the stretch release, this tutorial should work for you too.

Install via:

curl https://www.linux-projects.org/listing/uv4l_repo/lpkey.asc | sudo apt-key add -

Run sudo nano /etc/apt/sources.list and add the following line:

deb http://www.linux-projects.org/listing/uv4l_repo/raspbian/stretch stretch main

Run

sudo apt-get update
sudo apt-get install uv4l uv4l-raspicam uv4l-raspicam-extras uv4l-server uv4l-uvc uv4l-xscreen uv4l-mjpegstream uv4l-dummy uv4l-raspidisp

Enable camera interface

1. Run sudo raspi-config to open the configuration menu

2. Use this menu to enable Camera in the Interfacing Options

Setup UV4L

Run sudo nano /etc/uv4l/uv4l-raspicam.conf and set the camera resolution with the following parameters:

width = 320,
height = 240,

You can enable the camera at startup with:

sudo systemctl enable uv4l_raspicam

Restart Raspberry with sudo reboot now for this to take effect.

Run the following to see your Wifi configuration:

ifconfig wlan0

The IP-address for wlan0 you can now use and open in any web-browser which shares the same Wifi network. In my case, the URL for the camera stream is http://192.168.178.XX:8080/stream

Additionally, you can access the UI interface for UV4L on http://raspberrypi.local:8080/

There are some cool tutorials on what you can do with a camera available here. Enjoy tinkering 🤓🛠️

Engineering Manager @ Babbel

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store