Page 1 of 1

Raspberry pi and usb camera

Posted: Fri Oct 11, 2013 10:06 am
by akashdeepmitthu
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

Re: Raspberry pi and usb camera

Posted: Sat Oct 12, 2013 12:22 am
by rpi2tk
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

Re: Raspberry pi and usb camera

Posted: Sat Oct 12, 2013 3:23 am
by akashdeepmitthu
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?

Re: Raspberry pi and usb camera

Posted: Sat Oct 12, 2013 5:44 am
by ramstrong
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.

Re: Raspberry pi and usb camera

Posted: Sat Oct 12, 2013 8:25 am
by akashdeepmitthu
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.

Re: Raspberry pi and usb camera

Posted: Thu Oct 17, 2013 2:39 pm
by akashdeepmitthu
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.