Introduction: How to Make a Raspberry Eye
I searched for a new Raspberry Pi project for a while and the I had seen this Project: http://makezine.com/projects/raspberry-eye-remote-... . So i wanted to make this but ... the RPIO library doesn't work with the Raspberry Pi 2 b+ . So I read the code and then I rewrote the Code so that I could use the Code. For that I used the RPi.GPIO library and now I want to share this Project to the Community.
Step 1: The Parts
- An Raspberry Pi 2 b+ (optinal but I think you could also use all other Raspberrys)
- A Webcam ( for Livestreaming)
- One Servo
- Optional You can use some Leds for Lightning
- If you have no Jumper cables(Like me) then you can use a Floppy cable
- For the OS and the software you need of course an SD card
- A Keyboard + Mouse or an PC to program
- Also if you want to program on the Pi you also need a Display
and last but not least a Lan cable or an WLAN stick
Step 2: The Code
Unpack the .rar file than you have an folder called "Picam" and there is an Html and an python script. Copy it on to your Raspberry and just run the Python.
Oh by the way the Pin 23 on the Pi is for the servo.
If you have any Questions to the Code then just ask in the Comments
Step 3: Access
After you have run the Python you can access the Website with the IP adress from the Raspberry Pi.
Step 4: Livestream
For the Livstream:
Run up your Raspberry Pi to the command prompt
Install the webcam server software using the following command:
$ sudo apt-get install motion
This will take a few minutes to download and install but once it has finished and takes you back to the command prompt we are ready to continue.
Configure the software
Next we need to edit some of the config files so that the motion service will start on run up and be available on local network.
First we will edit the motion.conf file by typing:
$ sudo nano /etc/motion/motion.conf
This is quite a large conf file but the points you need to edit are:
DAEMON = OFF (change to ON)
Webcam_localhost = ON (Change to OFF)
Set the service up
Next we need to enable the Daemon (service):
$ sudo nano /etc/default/motion
start_motion_daemon = no (change to yes)
Ensure your webcam is plugged into the usb port on your Raspberry Pi and start the service:
$ sudo service motion start
If you want to stop the service then use the command:
$ sudo service motion stop
With the service started you can now open a webpage on your normal computer and by going to the IP of the Raspberry pi on port 8081 (in the address bar) you should be able to view your webcam(So your local IP adress should be 192.168.1.105:8081)
After you have unpacked the .rar file you have under the dictionary "templates" the main.html.
There go in the Row 25 and paste your IP.
Step 5: FAQ & Movie
If there any Questions please ask them in the comments.
Here is also a little movie from the Movement of the Servo
We have a be nice policy.
Please be positive and constructive.