All Projects → OutsourcedGuru → pizero-webcam-tutorial

OutsourcedGuru / pizero-webcam-tutorial

Licence: MIT license
A step-by-step tutorial for setting up a Raspberry Pi Zero W computer as a webcam

Projects that are alternatives of or similar to pizero-webcam-tutorial

octoprint-cli
Command line tool for controlling your OctoPrint 3D printer server
Stars: ✭ 25 (+0%)
Mutual labels:  octoprint
OctoPrint-CameraSettings
An OctoPrint plugin that allows a user to interactively change camera settings.
Stars: ✭ 31 (+24%)
Mutual labels:  octoprint
raspicam2 node
ROS2 node for camera module of Raspberry Pi
Stars: ✭ 31 (+24%)
Mutual labels:  raspicam
OctoPrint-AutomaticShutdown
Plugin for automatically shutting down the system after print is finished
Stars: ✭ 18 (-28%)
Mutual labels:  octoprint
octocitrico
OctoPrint for other fruits
Stars: ✭ 76 (+204%)
Mutual labels:  octoprint
ioBroker.octoprint
ioBroker adapter to manage your 3D printer over ioBroker
Stars: ✭ 31 (+24%)
Mutual labels:  octoprint
threedy
Home Assistant card for 3D printer status and management.
Stars: ✭ 159 (+536%)
Mutual labels:  octoprint
OctoPrint-Octoremote
A hardware remote for Octoprint controlled 3D Printers
Stars: ✭ 23 (-8%)
Mutual labels:  octoprint
OctoPrint-TasmotaMQTT
No description or website provided.
Stars: ✭ 17 (-32%)
Mutual labels:  octoprint
Octoprint
OctoPrint is the snappy web interface for your 3D printer!
Stars: ✭ 6,267 (+24968%)
Mutual labels:  octoprint
octoscreen
A touchscreen client for Octoprint
Stars: ✭ 26 (+4%)
Mutual labels:  octoprint
OctoPrint-AstroPrint
Connect your OctoPrint device to the AstroPrint 3D Printing Cloud
Stars: ✭ 26 (+4%)
Mutual labels:  octoprint
OctoPrint-Tasmota
No description or website provided.
Stars: ✭ 52 (+108%)
Mutual labels:  octoprint
OctoPrint-DisplayPanel
Simple control and status paired with a physical button panel and OLED display
Stars: ✭ 50 (+100%)
Mutual labels:  octoprint
raspicam
Go package for controlling Raspberry Pi Camera Module
Stars: ✭ 61 (+144%)
Mutual labels:  raspicam
Octoprint-Upgrade-To-Py3
A script to move an existing OctoPrint install from Python 2 to Python 3
Stars: ✭ 58 (+132%)
Mutual labels:  octoprint
OctoPrint-CuraEngineLegacy
Plugin for slicing via Cura Legacy from within OctoPrint
Stars: ✭ 16 (-36%)
Mutual labels:  octoprint
OctoPrint-GcodeEditor
Edit gcode on OctoPrint
Stars: ✭ 20 (-20%)
Mutual labels:  octoprint
OctoPrint-Smuff
OctoPrint Plugin for SMuFF
Stars: ✭ 17 (-32%)
Mutual labels:  octoprint
Octoprint-Cancelobject
No description or website provided.
Stars: ✭ 90 (+260%)
Mutual labels:  octoprint

pizero-webcam-tutorial

A step-by-step tutorial for setting up a Raspberry Pi Zero W computer as a webcam

OctoPrint is the leading web software for controlling 3D printers, created/maintained by Gina Häußge

OctoPi is a Raspberry-specific distro of OctoPrint, maintained by Guy Sheffer

mjpg-streamer is a fork of a popular streaming service as maintained by Jackson Liam

Overview

Although a standard OctoPi installation seems to work fine with a single camera (Raspberry Pi 3), adding a second webcam can sometimes add to the complexity. Adding a webcam to an OctoPi install on a Raspberry Pi Zero or Zero W is asking too much of the single core processor; it's best to offload this work if possible.

Using the approach here, it should be possible to build a dedicated Raspberry Pi Zero W—based webcam. In theory, you could have several views of your 3D printer and include them within the OctoPrint web interface to offer different viewpoints of the work being accomplished.

Installation

  1. Visit the downloads page to get the latest Raspbian Stretch Lite image
  2. Use Etcher to burn this image to a 4GB microSD card that you've installed in your workstation, noting that it should automatically eject the card when finished
  3. Remove and re-insert the microSD card so that it's mounted again
  4. Using Finder or the Terminal program, create a new /Volumes/boot/wpa_supplicant.conf file. Add a line with country=US so that it indicates your own country code then add the following at the end of the file (editing with your own zone/password information but keeping the quotation marks).
country=US

network={
    ssid="your_SSID"
    psk="your_PSK"
    key_mgmt=WPA-PSK
}

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

Additionally, create an empty file in /Volumes/boot called ssh.

 5. Use Finder's eject feature to safely eject the microSD card, removing it and putting it into the Raspberry Pi Zero W computer

 6. Install the Raspberry Pi—based webcam with the micro ribbon cable

 7. Power the Raspberry Pi Zero W with a 5V micro USB adapter or USB cable, noting the activity of the onboard LEDs

 8. Remote into the computer by running ssh [email protected] using raspberry as the default password

 9. Remotely on the Raspberry, run sudo raspi-config to:

  • change the hostname to something like picam1 under the 2 Network Options -> N1 Hostname section
  • change the default password to something you can remember under the 1 Change User Password section
  • change the localisation settings to minimally update the wi-fi country code and timezone but also the locale information and the keyboard layout
  • change the bootup options to log in automatically to the console under the 3 Boot Options -> B1 Desktop / CLI -> B2 Console Autologin option
  • change the Interfacing Options -> P1 Camera to enable it
  • select Advanced Options -> A1 Expand Filesystem
  • choose Finish

 10. Having rebooted after that session, note that the hostname and (optionally) the password would have changed as you remote back into the Raspberry with ssh [email protected], for example

 11. Remotely, run sudo apt-get update as well as the following command

 12. sudo apt-get upgrade -y

 13. sudo apt-get install git -y

 14. sudo apt-get install cmake libjpeg8-dev -y

 15. cd ~

 16. git clone https://github.com/jacksonliam/mjpg-streamer.git

 17. cd mj*/mj*

 18. make

 19. sudo make install

 20. Run sudo nano /etc/rc.local and add this before the exit command:

cd /home/pi/mjpg-streamer/mjpg-streamer-experimental
export LD_LIBRARY_PATH="$(pwd)"
./mjpg_streamer -i "input_raspicam.so" -o "output_http.so -w ./www"

 21. Run sudo reboot and wait two minutes

 22. Try http://picam1.local:8080 and http://picam1.local:8080/?action=stream

Main page screenshotStream screenshot

Follow-up

From here, you may want to install the MultiCam plugin to take advantage of your external webcam, as hosted by a Raspberry Pi Zero W computer.

--

Description Version Author Last Update
pizero-webcam-tutorial v1.0.1 OutsourcedGuru June 18, 2018
Donate Cryptocurrency
eth-receive btc-receive
Ethereum Bitcoin
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].