The Raspberry Pi microcomputer ecosystem offers an abundance of resources for inexpensive and useful DIY projects.
Though some assembly is required, the object of this particular project is to easily create a video stream using a USB webcam which is accessible on both laptop and/or smartphone. This consists of the Raspberry Pi 4 and a generic USB webcam.
This example is run as "headless" or without a monitor using SSH or Secure Shell protocol. In a nutshell, the IP address of the Raspberry Pi is acquired and a connection is made remotely between the laptop (or any other computer) and the Raspberry Pi. In my case via the Putty utility. The commands are all executed at the command line level.
The basis of this was derived from these two tutorials:
1. How to connect Logitech c310 HD Webcam to Raspberry pi (Easy) - YouTube
The above should be referenced but can be distilled as below:
Run the command sudo lsusb to validate the webcam is present.
Run the sudo raspi-config command to bring up the configuration tool enabling the camera and save changes.
Run the command sudo apt-get install fswebcam.
Execute the command fswebcam -d /dev/video0 -r 640x480 test.jpg and validate that test.jpg (or as named) has taken a picture.
However, the video stream requires a different software package: the Motion utility.
Follow the tutorial (#2) referenced above.
The cover photo illustrates the stream on both the laptop and smartphone at 198.168.0.16:8081
With its vast array of connections for USB's, HDMI, and Ethernet plus GPIO pins which can connect to sensors and external components and built-in Wi-Fi, this introduction can be augmented by other Pi projects. This might be considered a baseline for future functions working in tandem on one or more Pi's.
Inexpensive and robust applications can be implemented as needed and conceived for any home do-it-yourself hobbyist on this platform.
Comments
Please log in or sign up to comment.