Skip to content

Instantly share code, notes, and snippets.

@rumspeed
Last active July 17, 2021 17:50
Show Gist options
  • Save rumspeed/5838e9ee055f2f5a8e09256f6183b2b7 to your computer and use it in GitHub Desktop.
Save rumspeed/5838e9ee055f2f5a8e09256f6183b2b7 to your computer and use it in GitHub Desktop.
Raspberry Pi - Bash Scripts for timelapse camera
#!/bin/bash
# take a photo every 5 seconds and copy it to another computer
while true
do
raspistill -n -w 1920 -h 1080 -t 3000 -o img4web.jpg
scp img4web.jpg [email protected]:/var/www/html
sleep 5
done
#!/bin/bash
# take a photo and copy it to another computer
raspistill -n -w 1920 -h 1080 -t 3000 -o img4web.jpg
scp img4web.jpg [email protected]:/var/www/html
#!/bin/bash
counter=0
while true
do
filename=`date +%Y%m%d%H%M%S`.jpg
raspistill -w 1920 -h 1080 -t 1 -o $filename
let counter++
echo Pi Took A Pic! Image: $counter
sleep 1
done
#!/bin/bash
counter=0
while true
do
filename=`date +%Y%m%d%H%M%S`.jpg
raspistill -n -w 1920 -h 1080 -t 3000 -o $filename
let counter++
echo Pi Took A Pic! $counter Image in $SECONDS seconds
sleep 6
done
#!/bin/bash
while true
do
filename=`date +%Y%m%d%H%M%S`.jpg
raspistill -n -w 1920 -h 1080 -t 3000 -o $filename
echo Pi Took A Pic!
sleep 5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment