Dev doc index Buy

Using the Raspicam

To use the Raspicam enable it with:

sudo raspi-config

from the menu 5 Interfacing Options - P1 Camera - [OK] then reboot.

MJPG streaming

Install Python3 and Python3-picamera libraries

sudo apt update
sudo apt install python3
sudo apt install python3-picamera

Save this small Python program stream.py in /home/pi directory:

cd /home/pi
wget https://www.acmesystems.it/www/CM3-PANEL_raspicam/stream.py

Create this file:

sudo nano /lib/systemd/system/stream.service

with this content:

[Unit]
Description=MJPG streaming with Raspicam
After=systemd-user-sessions.service

[Service]
ExecStart=/usr/bin/python3 stream.py
Restart=on-abort
User=pi
WorkingDirectory=/home/pi

[Install]
WantedBy=multi-user.target

save and launch the service:

sudo systemctl daemon-reload
sudo systemctl enable stream.service 
sudo systemctl start stream.service 

Open a browser on a PC on this url:

Links

Dev doc index Buy

Bruna Mandolino