Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Simple Program to Help Take Timelapse Photos
- num_one=0
- num_two=0
- echo -n "How often would you like a photo to be taken (in seconds): "
- read num_one
- echo -n "How long would you like the time lapse to run (in minutes): "
- read num_two
- often=$((num_one * 1000))
- duration=$((num_two * 1000 * 60))
- echo "$often"
- echo "$duration"
- echo -e "\n$(((num_two * 60) / num_one)) pictures will be taken\n\n"
- echo -e "Starting now..."
- raspistill -o img%04d.jpg -tl $often -t $duration
- pi@PIcam ~ $ ./timelapse
- How often would you like a photo to be taken (in seconds): 2
- How long would you like the time lapse to run (in minutes): 0.5
- ./timelapse: line 13: 0.5: syntax error: invalid arithmetic operator (error token is ".5")
- 2000
- ./timelapse: line 18: 0.5: syntax error: invalid arithmetic operator (error token is ".5")
- Starting now...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement