Step by step
Note: Any text that is shown in this resource like this should be typed onto the screen exactly as it appears.
-
Fill your pot or seed tray with compost and sow your chosen seeds. Position your pot or seed tray in its final position.
-
Set up your Raspberry Pi, monitor and camera next to it. Using the tripod, position the camera towards the soil surface.
-
Turn on the Raspberry Pi and monitor and when you get to the log in screen, enter your username and password (the defaults are pi and raspberry respectively).
-
Enter the following command to test that the camera is working and pointing in the correct direction:
raspistill -o test.jpg -t 5000
-
To test that the time lapse function is working, it is a good idea to try a smaller length of time, for example:
raspistill -o test_%04d.jpg -tl 10000 -t 600000. This will automatically capture an image every 10 seconds for 10 minutes. Time must be specified in milliseconds, so 10 seconds is 10000 and ten minutes is 600000. Here are some useful times calculated in milliseconds for you already:
Time |
Milliseconds |
5 seconds |
5000 |
10 seconds |
10000 |
30 seconds |
30000 |
1 minute |
60000 |
5 minutes |
300000 |
10 minutes |
600000 |
30 minutes |
1800000 |
1 hour |
3600000 |
5 hours |
18000000 |
24 hours |
86400000 |
48 hours |
172800000 |
-
The %04d will add a four digit sequential number at the end of each filename e.g. test_0001.jpg, test_0002.jpg
-
While the time lapse is recording, the camera preview window will show up on the screen with periodic flashes of the still images as they are taken.
-
Once the images have all been taken, you can create the time lapse video by entering the command:
avconv -r 10 -i test_%04d.jpg -r 10 -vcodec libx264 -crf 20 -g 15 test_timelapse.mp4
-
You can speed this up by scaling down each image as they're stitched into the final film. The command to do this is:
avconv -r 10 -i test_%04d.jpg -r 10 -vcodec libx264 -crf 20 -g 15 -vf scale=1296:972 test_timelapse.mp4
-
You will then need to move the file from the Pi to your PC by using WinSCP.