Advertisement
Guest User

Untitled

a guest
May 31st, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. #!/bin/bash
  2. # Simple Program to Help Take Timelapse Photos
  3.  
  4. num_one=0
  5. num_two=0
  6.  
  7. echo -n "How often would you like a photo to be taken (in seconds): "
  8. read num_one
  9. echo -n "How long would you like the time lapse to run (in minutes): "
  10. read num_two
  11.  
  12. often=$((num_one * 1000))
  13. duration=$((num_two * 1000 * 60))
  14.  
  15. echo "$often"
  16. echo "$duration"
  17.  
  18. echo -e "\n$(((num_two * 60) / num_one)) pictures will be taken\n\n"
  19.  
  20. echo -e "Starting now..."
  21.  
  22. raspistill -o img%04d.jpg -tl $often -t $duration
  23.  
  24.  
  25.  
  26.  
  27.  
  28. pi@PIcam ~ $ ./timelapse
  29. How often would you like a photo to be taken (in seconds): 2
  30. How long would you like the time lapse to run (in minutes): 0.5
  31. ./timelapse: line 13: 0.5: syntax error: invalid arithmetic operator (error token is ".5")
  32. 2000
  33.  
  34. ./timelapse: line 18: 0.5: syntax error: invalid arithmetic operator (error token is ".5")
  35. Starting now...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement