Skip to content

Instantly share code, notes, and snippets.

@NanoDano
Created June 5, 2018 04:39
Show Gist options
  • Save NanoDano/55ade568633eaeb0c66ee05de7e2a71c to your computer and use it in GitHub Desktop.
Save NanoDano/55ade568633eaeb0c66ee05de7e2a71c to your computer and use it in GitHub Desktop.
Raspberry Pi take timelapse pictures
# Take a picture with the Pi camera
# Set this script to run on a cron job
# crontab -e
# Every 5th minute
# */5 * * * /home/pi/timelapse_scripts/take_pic.sh 2>&1
DATE=`date '+%Y-%m-%d-%H-%M-%S'`
echo "$DATE [*] Taking picture"
raspistill -o /home/pi/Pictures/image-${DATE}.jpg
DATE=`date '+%Y-%m-%d-%H-%M-%S'`
echo "$DATE [+] Done taking picture."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment