akashdeepmitthu
Posts: 15
Joined: Fri Oct 11, 2013 9:54 am

Raspberry pi and usb camera

Fri Oct 11, 2013 10:06 am

Hello to all!!!! I am new to raspberry pi as I had done projects on Arduino. I need to make time lapse camera using my usb cam to monitor my room. The system should start photography in the time lapse of 500 ms when any person will enters into room and it should store on the sd card. And it should stop when nobody will be in room. I don' t want to upload the photo on server. I just want it to be on sd card. I am thinking to use PIR controller.

If it is possible then please guide me with code and required hardware.

Thanks

rpi2tk
Posts: 7
Joined: Sun Sep 15, 2013 7:53 pm

Re: Raspberry pi and usb camera

Sat Oct 12, 2013 12:22 am

first off for hardware check http://elinux.org/RPi_USB_Webcams if you are in the UK and looking for a cheap webcam then i would recommend this one http://www.amazon.co.uk/gp/product/B002 ... UTF8&psc=1 i have one and it works out of the box with out USB hub

as for the software i would use motion and here is a tutorial http://www.maketecheasier.com/setup-mot ... cam-ubuntu its highly configurable the only thing i would change in the tutoral is not to copy of the motion.conf file instead edit the config file via sudo nano /etc/motion/motion.conf also you may have issues with the process_id_file to get around this use the following
cd
mkdir .motion

and then in the motion.conf file edit the line process_id_file to state at end /home/USER NAME/.motion/motion.pid change the USER NAME to the name you log in via if you are using pi login then change it to pi
a 39 year old Geek with 32 years of geekdom

akashdeepmitthu
Posts: 15
Joined: Fri Oct 11, 2013 9:54 am

Re: Raspberry pi and usb camera

Sat Oct 12, 2013 3:23 am

Thanks sir for your support. Sir I have a doubt that to install motion software in pi we just need to copy the software and paste it into pi sd card from window PC. Is it right method?
2. After configuration of webcam and motion software, can I run it without monitor and keyboard just with webcam?

ramstrong
Posts: 36
Joined: Thu Aug 15, 2013 11:14 pm
Contact: Website

Re: Raspberry pi and usb camera

Sat Oct 12, 2013 5:44 am

Yes you can leave off monitor and keyboard. That's how I set up mine. Note that once you install motion via apt-get, you may need to install ffmpeg and avcon as well.

I also suggest that if you want to run it headless, to have the program running at boot. With USB camera, you can easily just pull the plug off the USB connector if you don't want the camera.

Setting it up as service was huge pain. Once I set it up that way, I found out I can avoid the hassle by inserting
@reboot motion &
at cron. Use crontab -e to do it.
Raspberry Pi Journal: http://simpletongeek.blogspot.com/p/raspberry-pi-journal-directory_4.html

akashdeepmitthu
Posts: 15
Joined: Fri Oct 11, 2013 9:54 am

Re: Raspberry pi and usb camera

Sat Oct 12, 2013 8:25 am

Thanks sir for your support.
Sir please clear 2 things.
1. Can I copy the motion software into sd card from windows os and then put it on rspi.
2. Can I use 64 GB sd card.

akashdeepmitthu
Posts: 15
Joined: Fri Oct 11, 2013 9:54 am

Re: Raspberry pi and usb camera

Thu Oct 17, 2013 2:39 pm

Today I got my raspberry pi model B board. I am doing project on webcam but before that I had installed raspbian image into my 8 GB sd card. But after image get written on the card then sd card size was reduced to 250 MB. Why that happened and how to expand it to 7.5 GB.

Return to “Beginners”