1 Project 2: Image capture and motion detection
1.1 Using motion
Motion can be used for image capture. I thought it might be nice to capture images of the "environment" alongside temperature.
sudo apt-get install motion
You then need to edit the config file:
And enable the daemon (if you are going to use it):
Then start the service:
sudo service motion start
1.2 Using a PIR sensor
See e.g. this guide for the Adafruit PIR sensor  on the PIR sensor. Note:
- The jumper switch: non-retriggering (jumper towards edge, H) vs. retriggering (jumper towards middle, L). If you have something that "edge triggered", you should have the "L" setting (jumper more to centre of board)
- The pods, for
- timeout - duration for which the output is high after detecting motion (in the pictures on the above link, you can see the positions are labeled as min/max)
- sensitivity: clockwise makes it more sensitive (also labeled as min/max).
My PIR sensor doesn't seem to be an Adafruit one, and while it has similar switch/pods, they aren't quite in the same locations. Compared to the adafruit one, the jumper is to the right of the pods (with the cap on top, looking at the pods).
- Retriggering is with the jumper towards the edge, non-retriggering is with the jumper to the centre (opposite of adafruit)
- Same as Adafruit, the left pod (cap on top, looking at the pods) does timeout. Shortest time about 3 secs, and easily up to a few mins.
- The other pod is sensitivity.
1.2.1 Important: Interference
I've not seen this mentioned on pages describing the PIR use, but apparently the PIR sensor can be susceptible to interference, see https://www.raspberrypi.org/forums/viewtopic.php?f=37&t=112111&p=1120330.