When we install it, please point the camear outside toward the pcDuino3 board.
The CMOS image sensor used is OV5640.
We need to modify /etc/modules to enable the driver for OV5640 by command ‘sudo leafpad /etc/modules’:
After we made the change, we need to reboot pcDuino.
You can input command “guvcview -s 1600×1200” in terminal as a test.
“mjpg-streamer”, is used to capture images from the webcam camera, and put them in the form of a stream to the browser, such as Firefox, Cambozola, or VLC player by network. mipg-streamer can use some webcams hardware compression features to reduce the overhead of the CPU, providing a lightweight and low power consumption for embedded devices and some conventional servers.
1. Install mjpg-streamer required dependent libraries
$sudo apt-get install libv4l-dev $sudo apt-get install libjpeg8-dev $sudo apt-get install subversion $sudo apt-get install imagemagick
2. Download and install mjpg-streamer:
$svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer/ mjpg-streamer
Install mjpg-streamer using the following commands:
$cd mjpg-streamer/mjpg-streamer $make USE_LIBV4L2=true clean all $sudo make DESTDIR=/usr install
3. Running the below command to open the server.
$mjpg_streamer -i "/usr/lib/input_uvc.so -d /dev/video0 -y -r 320x240 -f 10" -o "/usr/lib/output_http.so -p 8090 -w /var/www/mjpg_streamer"
4. Checking pcDuino IP address ($ ifconfig), open pcDuino browser or other browser which is on the same local area network. Input the address as shown below to see the video. My pcDuino IP address is 192.168.100.21 so I would enter this url.
There is an open source Android APP that can be used to view the streaming video. The source files are hosted at here.
On a mac computer, we can clone the project using:
Download and install Android Studio if you have not already. Click ‘Import project’, and then navigate to the directory where the Cxemcar2 is located.
The screenshots show the Android APP below: