Introduction: Remote Control Camera by Raspberry Pi
This instructable will guide how to:
1. Put camera to Local web (for remote vision through Computer or Phone)
2. Control camera vision (using gear motor)
Part list for project:
1. Motor with gear https://amzn.to/2OLQxxq
2. Raspberry Pi B https://amzn.to/2VJIOBy
3. H-bridge https://amzn.to/2QS2FeI
4. USB camera (Logitech) https://amzn.to/35w1DMN
Step 1: Put Stream Camera Into Local Web (using "motion")
$ sudo apt-get update
$ sudo apt-get install motion
$ sudo apt-get install libv4l-0
$ sudo apt-get install uvccapture
$ gedit /etc/default/motion
change "start_motion_daemon yes" (from "no")
$ gedit /etc/motion/motion.conf
change daemon on (from "off")
stream_localhost off (from "on")
framerate 100 (from "2")
stream_maxrate 10 (from "1")
$ service motion start
$ motion start
In case to stop camera:
$ motion stop
$ service motion stop
Open web browser, input address: 192.168.1.71:8081 -> camera image should be on web browser (note: 192.168.1.71 is Raspberry IP address)
Step 2: Make Local Server
$ sudo apt-get install apache2 php5 libapache2-mod-php5
If everything is OK, local web will display in Web Browser after input address 192.168.1.71/index.html
This "index.html" is saved in /var/www/html/
Step 3: Put "camera" and "IO Control" to Local Server
On step 1, camera image is on stream (192.168.1.71:8081)
On step 2, a local web server is made.
So an php page is made in Local server to load camera stream, meanwhile this php page also have 2 button (turn left/right) to control camera
For easy, whole project is save at this link (google share)
Take above files, extract it, then save all files and folder into /var/www/html/
Step 4: Install Hardware
GPIO of Raspberry (GPIO_0, GPIO_7, GND) is used to control Motor driver (H-Bridge L298N)
Make camera base, install them all together as picture.
Step 5: Test It!
Open web browser, input address 192.168.1.71/camera.php
Now we can test it, and see result