One of the things I want to try out is automatic recording of birds which visit the bird bath so the idea was to use a passive IR movement detector to tell the RPi when to record a photo from a USB camera.
It took a couple of hours scouring the net to find all the information I needed along with lots of failed coding attempts but eventually I got the idea to work just as a test layout in the kitchen. Very few components are needed - the Raspberry Pi (B+ in my case), the USB camera and the PIR:
(clicking on a photo will open a larger copy)
Of course a screen, mouse and keyboard were attached while coding.
Cobbling together several pieces of code from different sources resulted in:
GPIO to acces the pins
time to be able to add delays where needed
os to give access to fswebcam code
N is a numerical counter which increments each time a photo is saved and added as a four digit number to the file name.
Next will be to get the photos saved on a USB stick instead of the micro SD card.