Fig. 1: Image of Webcam Interfaced to Beaglebone Black
Web cam is needed for image capturing and video streaming applications. You can interface web cam with Beaglebone Black and capture the picture and video as well. In this tutorial I will interface Logitech web camera with BBB. I have explained step by step setup of web cam interfacing with BBB. Before connecting web cam, I will explain about VNC remote connection of Beaglebone Black. If you get SSH access of BBB, it will not display image or video due to insufficient GUI. So you need to take virtual remote access of BBB on desktop.
Fig. 2: Prototype of Beaglebone Black based Security Camera
VNC remote access of BBB on desktop
Step1: Connect with internet and power up BBB. Take the access of BBB with SSH through PC.
Fig.3: Screenshot of Accessing Beaglebone Black (BBB) with SSH through PC
Step2: First of all upgrade your kernel version. (Ignore if already done)
Step3: Once the upgrade is finished, reboot your system.
Step4: We need to install a VNC server (i.e. x11VNC) in BBB by entering the following command:
sudo apt-get install x11vnc
Step5: We need VNC viewer on desktop for remote access of BBB. Open another command prompt and install VNC viewer (Here I have installed vinagre) by following command:
sudo apt-get install vinagre
Step6: Now again go to command prompt which has SSH access of BBB and start VNC server by entering the following command:
x11vnc -auth /var/run/lightdm/root/:0 -forever
Fig. 4: Screenshot of Root Login from Linux Console on Beaglebone Black
It will start on port 5900.
Step7: Again go to local desktop command prompt (which is previously opened for install vinagre) and run following command:
vinagre 192.168.7.2::5900
Fig. 5: Screenshot of Desktop Command Prompt on PC
Now you have remote access of Beaglebone black on your local desktop. You can open command prompt from tool and operate same as desktop.
Fig. 6: Screenshot of Linux on Beaglebone Black (BBB)
Web cam Setup in BBB
Step1: Now, Disconnect power cable from BBB. Connect web cam (i.e., Logitech in this tutorial) into USB port and again power up to BBB. Take the access of BBB with SSH through PC.
Step2: Take a remote access of Beaglebone black as explained above. Open command prompt from BBB desktop.
Fig. 7: Screenshot of Webcam Setup on Beaglebone Black
Step3: Check if the web cam is detected by BBB or not by entering following command
ls /dev/video0
Step4: Now, to capture the image or video, install an image viewer (i.e. guvcview) in BBB by using following line:
sudo apt-get install guvcview
Fig. 8: Screenshot of Installing Guvcview on Beaglebone Black
Step5: After installation run the following command from terminal:
guvcview
Fig. 9: Screenshot of Command Terminal on PC
Step6: Now your webcam is ready to capture images and videos.
Fig. 10: Screenshot of Image Captured on PC from Beaglebone Black based Security Camera
Circuit Diagrams
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.